From 7a89b5cb9e79ac744b38ab558a291ffb4a18e5dc Mon Sep 17 00:00:00 2001 From: Tyler Dauwalder Date: Wed, 24 Jul 2002 09:30:20 +0000 Subject: [PATCH] Added Equals() function, which sadly I haven't tested (I just stole it from StorageKit::BasicTest, the version of which has been proven many times over ;-) git-svn-id: file:///srv/svn/repos/haiku/trunk/current@417 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/tools/cppunit/TestUtils.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/headers/tools/cppunit/TestUtils.h b/headers/tools/cppunit/TestUtils.h index 05f6bf5f69..24fc345f01 100644 --- a/headers/tools/cppunit/TestUtils.h +++ b/headers/tools/cppunit/TestUtils.h @@ -15,6 +15,16 @@ // use it inline in tests if necessary. status_t DecodeResult(status_t result); +// First parameter is equal to the second or third +template +static +inline +bool +Equals(const A &a, const B &b, const C &c) +{ + return (a == b || a == c); +} + // Returns a string version of the given integer std::string IntToStr(int i);