本文整理汇总了C++中Var::isSigned方法的典型用法代码示例。如果您正苦于以下问题:C++ Var::isSigned方法的具体用法?C++ Var::isSigned怎么用?C++ Var::isSigned使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Var
的用法示例。
在下文中一共展示了Var::isSigned方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testEmpty
void VarTest::testEmpty()
{
Var da;
assert (da.isEmpty());
assert (da.type() == typeid(void));
assert (!da.isArray());
assert (!da.isInteger());
assert (!da.isNumeric());
assert (!da.isSigned());
assert (!da.isString());
assert (!(da == da));
assert (!(da != da));
da = "123";
int i = da.convert<int>();
assert (123 == i);
std::string s = da.extract<std::string>();
assert ("123" == s);
assert (!da.isEmpty());
da.empty();
assert (da.isEmpty());
assert (da.type() == typeid(void));
assert (!da.isArray());
assert (!da.isInteger());
assert (!da.isNumeric());
assert (!da.isSigned());
assert (!da.isString());
assert (!(da == da));
assert (!(da != da));
assert (da != "");
assert ("" != da);
assert (!(da == ""));
assert (!("" == da));
testEmptyComparisons<unsigned char>();
testEmptyComparisons<char>();
testEmptyComparisons<Poco::UInt8>();
testEmptyComparisons<Poco::Int8>();
testEmptyComparisons<Poco::UInt16>();
testEmptyComparisons<Poco::Int16>();
testEmptyComparisons<Poco::UInt32>();
testEmptyComparisons<Poco::Int32>();
testEmptyComparisons<Poco::UInt64>();
testEmptyComparisons<Poco::Int64>();
#ifdef POCO_LONG_IS_64_BIT
testEmptyComparisons<unsigned long>();
testEmptyComparisons<long>();
#endif
testEmptyComparisons<float>();
testEmptyComparisons<double>();
try
{
int i = da;
fail ("must fail");
} catch (InvalidAccessException&) { }
try
{
int i = da.extract<int>();
fail ("must fail");
} catch (InvalidAccessException&) { }
}