From 6ff7e795752b0cfc3d85e447bab063667e786150 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Sat, 10 Oct 2009 21:58:44 +0000 Subject: tests: Added more node/attribute tests git-svn-id: http://pugixml.googlecode.com/svn/trunk@141 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/test.hpp') diff --git a/tests/test.hpp b/tests/test.hpp index 09d7024..6b8878e 100644 --- a/tests/test.hpp +++ b/tests/test.hpp @@ -1,6 +1,13 @@ #ifndef HEADER_TEST_HPP #define HEADER_TEST_HPP +#include + +inline bool test_string_equal(const char* lhs, const char* rhs) +{ + return (!lhs || !rhs) ? lhs == rhs : strcmp(lhs, rhs) == 0; +} + struct test_runner { test_runner(const char* name) @@ -55,5 +62,6 @@ struct dummy_fixture {}; TEST_FIXTURE(name, test_fixture_##name) #define CHECK(condition) if (condition) ; else throw #condition " is false" +#define CHECK_STRING(value, expected) if (test_string_equal(value, expected)) ; else throw #value " is not equal to " #expected #endif -- cgit v1.2.3