mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 16:48:06 +02:00
Rename assert by assertTrue
This commit is contained in:
@@ -36,7 +36,7 @@ void AttributesParserTest::testParser1()
|
||||
std::istringstream istr("");
|
||||
AttributesParser parser(attrs, istr);
|
||||
parser.parse();
|
||||
assert (attrs.begin() == attrs.end());
|
||||
assertTrue (attrs.begin() == attrs.end());
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ void AttributesParserTest::testParser2()
|
||||
std::istringstream istr("name=value");
|
||||
AttributesParser parser(attrs, istr);
|
||||
parser.parse();
|
||||
assert (attrs.getString("name") == "value");
|
||||
assertTrue (attrs.getString("name") == "value");
|
||||
}
|
||||
|
||||
|
||||
@@ -56,8 +56,8 @@ void AttributesParserTest::testParser3()
|
||||
std::istringstream istr("name=value, name2=100");
|
||||
AttributesParser parser(attrs, istr);
|
||||
parser.parse();
|
||||
assert (attrs.getString("name") == "value");
|
||||
assert (attrs.getInt("name2") == 100);
|
||||
assertTrue (attrs.getString("name") == "value");
|
||||
assertTrue (attrs.getInt("name2") == 100);
|
||||
}
|
||||
|
||||
|
||||
@@ -67,9 +67,9 @@ void AttributesParserTest::testParser4()
|
||||
std::istringstream istr("name=value, name2=100, name3");
|
||||
AttributesParser parser(attrs, istr);
|
||||
parser.parse();
|
||||
assert (attrs.getString("name") == "value");
|
||||
assert (attrs.getInt("name2") == 100);
|
||||
assert (attrs.getBool("name3"));
|
||||
assertTrue (attrs.getString("name") == "value");
|
||||
assertTrue (attrs.getInt("name2") == 100);
|
||||
assertTrue (attrs.getBool("name3"));
|
||||
}
|
||||
|
||||
|
||||
@@ -79,9 +79,9 @@ void AttributesParserTest::testParser5()
|
||||
std::istringstream istr("name.a=value, name.b=100, name.c");
|
||||
AttributesParser parser(attrs, istr);
|
||||
parser.parse();
|
||||
assert (attrs.getString("name.a") == "value");
|
||||
assert (attrs.getInt("name.b") == 100);
|
||||
assert (attrs.getBool("name.c"));
|
||||
assertTrue (attrs.getString("name.a") == "value");
|
||||
assertTrue (attrs.getInt("name.b") == 100);
|
||||
assertTrue (attrs.getBool("name.c"));
|
||||
}
|
||||
|
||||
|
||||
@@ -91,9 +91,9 @@ void AttributesParserTest::testParser6()
|
||||
std::istringstream istr("name = {a=value, b=100, c}");
|
||||
AttributesParser parser(attrs, istr);
|
||||
parser.parse();
|
||||
assert (attrs.getString("name.a") == "value");
|
||||
assert (attrs.getInt("name.b") == 100);
|
||||
assert (attrs.getBool("name.c"));
|
||||
assertTrue (attrs.getString("name.a") == "value");
|
||||
assertTrue (attrs.getInt("name.b") == 100);
|
||||
assertTrue (attrs.getBool("name.c"));
|
||||
}
|
||||
|
||||
|
||||
@@ -103,10 +103,10 @@ void AttributesParserTest::testParser7()
|
||||
std::istringstream istr("name = {a=value, b=100, c}, name2=\"foo\"");
|
||||
AttributesParser parser(attrs, istr);
|
||||
parser.parse();
|
||||
assert (attrs.getString("name.a") == "value");
|
||||
assert (attrs.getInt("name.b") == 100);
|
||||
assert (attrs.getBool("name.c"));
|
||||
assert (attrs.getString("name2") == "foo");
|
||||
assertTrue (attrs.getString("name.a") == "value");
|
||||
assertTrue (attrs.getInt("name.b") == 100);
|
||||
assertTrue (attrs.getBool("name.c"));
|
||||
assertTrue (attrs.getString("name2") == "foo");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -69,47 +69,47 @@ void CppParserTest::testExtractName()
|
||||
{
|
||||
std::string decl("int _var");
|
||||
std::string name = Symbol::extractName(decl);
|
||||
assert (name == "_var");
|
||||
assertTrue (name == "_var");
|
||||
|
||||
decl = "void func(int arg1, int arg2)";
|
||||
name = Symbol::extractName(decl);
|
||||
assert (name == "func");
|
||||
assertTrue (name == "func");
|
||||
|
||||
decl = "const std::vector<NS::MyType>* var";
|
||||
name = Symbol::extractName(decl);
|
||||
assert (name == "var");
|
||||
assertTrue (name == "var");
|
||||
|
||||
decl = "const std::vector<NS::MyType>* func(int arg) = 0";
|
||||
name = Symbol::extractName(decl);
|
||||
assert (name == "func");
|
||||
assertTrue (name == "func");
|
||||
|
||||
decl = "int (*func)(int, const std::string&)";
|
||||
name = Symbol::extractName(decl);
|
||||
assert (name == "func");
|
||||
assertTrue (name == "func");
|
||||
|
||||
decl = "int ( * func )(int, const std::string&)";
|
||||
name = Symbol::extractName(decl);
|
||||
assert (name == "func");
|
||||
assertTrue (name == "func");
|
||||
|
||||
decl = "template <typename A, typename B> B func(A a, B b)";
|
||||
name = Symbol::extractName(decl);
|
||||
assert (name == "func");
|
||||
assertTrue (name == "func");
|
||||
|
||||
decl = "template <typename A, typename B> class Class";
|
||||
name = Symbol::extractName(decl);
|
||||
assert (name == "Class");
|
||||
assertTrue (name == "Class");
|
||||
|
||||
decl = "template <> class Class<int, std::string>";
|
||||
name = Symbol::extractName(decl);
|
||||
assert (name == "Class");
|
||||
assertTrue (name == "Class");
|
||||
|
||||
decl = "template <> class Class <int, std::string>";
|
||||
name = Symbol::extractName(decl);
|
||||
assert (name == "Class");
|
||||
assertTrue (name == "Class");
|
||||
|
||||
decl = "template <> class Class<int, MyTemplate<int> >";
|
||||
name = Symbol::extractName(decl);
|
||||
assert (name == "Class");
|
||||
assertTrue (name == "Class");
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user