text stringlengths 0 2.2M |
|---|
}
|
//*************************************************************************
|
TEST_FIXTURE(SetupFixture, test_less_than)
|
{
|
TextBuffer buffer;
|
const Text less(less_text.c_str(), buffer.data(), buffer.size());
|
TextBuffer buffer2;
|
const Text initial(initial_text.c_str(), buffer2.data(), buffer2.size());
|
// String-String
|
CHECK((less < initial) == (less_text < initial_text));
|
CHECK((initial < less) == (initial_text < less_text));
|
TextBuffer buffer3;
|
const Text greater(greater_text.c_str(), buffer3.data(), buffer3.size());
|
CHECK((greater < initial) == (greater_text < initial_text));
|
CHECK((initial < greater) == (initial_text < greater_text));
|
TextBuffer buffer4;
|
const Text shorter(shorter_text.c_str(), buffer4.data(), buffer4.size());
|
CHECK((shorter < initial) == (shorter_text < initial_text));
|
CHECK((initial < shorter) == (initial_text < shorter_text));
|
CHECK((initial < initial) == (initial_text < initial_text));
|
CHECK((initial < initial) == (initial_text < initial_text));
|
// String-Pointer Pointer-String
|
CHECK((less < pinitial_text) == (less_text < pinitial_text));
|
CHECK((pinitial_text < less) == (pinitial_text < less_text));
|
CHECK((greater < pinitial_text) == (greater_text < pinitial_text));
|
CHECK((pinitial_text < greater) == (pinitial_text < greater_text));
|
CHECK((shorter < pinitial_text) == (shorter_text < pinitial_text));
|
CHECK((pinitial_text < shorter) == (pinitial_text < shorter_text));
|
CHECK((initial < pinitial_text) == (initial_text < pinitial_text));
|
CHECK((pinitial_text < initial) == (pinitial_text < initial_text));
|
}
|
//*************************************************************************
|
TEST_FIXTURE(SetupFixture, test_less_than_or_equal)
|
{
|
TextBuffer buffer;
|
const Text less(less_text.c_str(), buffer.data(), buffer.size());
|
TextBuffer buffer2;
|
const Text initial(initial_text.c_str(), buffer2.data(), buffer2.size());
|
// String-String
|
CHECK((less <= initial) == (less_text <= initial_text));
|
CHECK((initial <= less) == (initial_text <= less_text));
|
TextBuffer buffer3;
|
const Text greater(greater_text.c_str(), buffer3.data(), buffer3.size());
|
CHECK((greater <= initial) == (greater_text <= initial_text));
|
CHECK((initial <= greater) == (initial_text <= greater_text));
|
TextBuffer buffer4;
|
const Text shorter(shorter_text.c_str(), buffer4.data(), buffer4.size());
|
CHECK((shorter <= initial) == (shorter_text <= initial_text));
|
CHECK((initial <= shorter) == (initial_text <= shorter_text));
|
CHECK((initial <= initial) == (initial_text <= initial_text));
|
CHECK((initial <= initial) == (initial_text <= initial_text));
|
// String-Pointer Pointer-String
|
CHECK((less <= pinitial_text) == (less_text <= pinitial_text));
|
CHECK((pinitial_text <= less) == (pinitial_text <= less_text));
|
CHECK((greater <= pinitial_text) == (greater_text <= pinitial_text));
|
CHECK((pinitial_text <= greater) == (pinitial_text <= greater_text));
|
CHECK((shorter <= pinitial_text) == (shorter_text <= pinitial_text));
|
CHECK((pinitial_text <= shorter) == (pinitial_text <= shorter_text));
|
CHECK((initial <= pinitial_text) == (initial_text <= pinitial_text));
|
CHECK((pinitial_text <= initial) == (pinitial_text <= initial_text));
|
}
|
//*************************************************************************
|
TEST_FIXTURE(SetupFixture, test_greater_than)
|
{
|
TextBuffer buffer;
|
const Text less(less_text.c_str(), buffer.data(), buffer.size());
|
TextBuffer buffer2;
|
const Text initial(initial_text.c_str(), buffer2.data(), buffer2.size());
|
// String-String
|
CHECK((less > initial) == (less_text > initial_text));
|
CHECK((initial > less) == (initial_text > less_text));
|
TextBuffer buffer3;
|
const Text greater(greater_text.c_str(), buffer3.data(), buffer3.size());
|
CHECK((greater > initial) == (greater_text > initial_text));
|
CHECK((initial > greater) == (initial_text > greater_text));
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.