Commit d36208eb authored by Anton Bukov's avatar Anton Bukov

Rename some tests and files

parent 7d8da6a0
...@@ -10,7 +10,7 @@ using namespace boolinq; ...@@ -10,7 +10,7 @@ using namespace boolinq;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(BitsRange, OneByteDefault) TEST(Bits, OneByteDefault)
{ {
unsigned char src[] = {0xAA}; unsigned char src[] = {0xAA};
int ans[] = {1,0,1,0,1,0,1,0}; int ans[] = {1,0,1,0,1,0,1,0};
...@@ -21,7 +21,7 @@ TEST(BitsRange, OneByteDefault) ...@@ -21,7 +21,7 @@ TEST(BitsRange, OneByteDefault)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(BitsRange, OneByteHL) TEST(Bits, OneByteHL)
{ {
unsigned char src[] = {0xAA}; unsigned char src[] = {0xAA};
int ans[] = {1,0,1,0,1,0,1,0}; int ans[] = {1,0,1,0,1,0,1,0};
...@@ -32,7 +32,7 @@ TEST(BitsRange, OneByteHL) ...@@ -32,7 +32,7 @@ TEST(BitsRange, OneByteHL)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(BitsRange, OneByteLH) TEST(Bits, OneByteLH)
{ {
unsigned char src[] = {0xAA}; unsigned char src[] = {0xAA};
int ans[] = {0,1,0,1,0,1,0,1}; int ans[] = {0,1,0,1,0,1,0,1};
...@@ -45,7 +45,7 @@ TEST(BitsRange, OneByteLH) ...@@ -45,7 +45,7 @@ TEST(BitsRange, OneByteLH)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(BitsRange, OneIntDefault) TEST(Bits, OneIntDefault)
{ {
unsigned int src[] = {0x12345678}; unsigned int src[] = {0x12345678};
int ans[] = int ans[] =
...@@ -62,7 +62,7 @@ TEST(BitsRange, OneIntDefault) ...@@ -62,7 +62,7 @@ TEST(BitsRange, OneIntDefault)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(BitsRange, OneIntHL) TEST(Bits, OneIntHL)
{ {
unsigned int src[] = {0x12345678}; unsigned int src[] = {0x12345678};
int ans[] = int ans[] =
...@@ -79,7 +79,7 @@ TEST(BitsRange, OneIntHL) ...@@ -79,7 +79,7 @@ TEST(BitsRange, OneIntHL)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(BitsRange, OneIntLH) TEST(Bits, OneIntLH)
{ {
unsigned int src[] = {0x12345678}; unsigned int src[] = {0x12345678};
int ans[] = int ans[] =
...@@ -99,7 +99,7 @@ TEST(BitsRange, OneIntLH) ...@@ -99,7 +99,7 @@ TEST(BitsRange, OneIntLH)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(BitsRange, IntsDefault) TEST(Bits, IntsDefault)
{ {
unsigned int src[] = {0x12345678,0xAABBCCDD}; unsigned int src[] = {0x12345678,0xAABBCCDD};
int ans[] = int ans[] =
...@@ -121,7 +121,7 @@ TEST(BitsRange, IntsDefault) ...@@ -121,7 +121,7 @@ TEST(BitsRange, IntsDefault)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(BitsRange, IntsHL) TEST(Bits, IntsHL)
{ {
unsigned int src[] = {0x12345678,0xAABBCCDD}; unsigned int src[] = {0x12345678,0xAABBCCDD};
int ans[] = int ans[] =
...@@ -143,7 +143,7 @@ TEST(BitsRange, IntsHL) ...@@ -143,7 +143,7 @@ TEST(BitsRange, IntsHL)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(BitsRange, IntsLH) TEST(Bits, IntsLH)
{ {
unsigned int src[] = {0x12345678,0xAABBCCDD}; unsigned int src[] = {0x12345678,0xAABBCCDD};
int ans[] = int ans[] =
......
...@@ -10,7 +10,7 @@ using namespace boolinq; ...@@ -10,7 +10,7 @@ using namespace boolinq;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(BytesRange, OneByteDefault) TEST(Bytes, OneByteDefault)
{ {
unsigned char src[] = {0xAA}; unsigned char src[] = {0xAA};
int ans[] = {0xAA}; int ans[] = {0xAA};
...@@ -21,7 +21,7 @@ TEST(BytesRange, OneByteDefault) ...@@ -21,7 +21,7 @@ TEST(BytesRange, OneByteDefault)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(BytesRange, OneByteFL) TEST(Bytes, OneByteFL)
{ {
unsigned char src[] = {0xAA}; unsigned char src[] = {0xAA};
int ans[] = {0xAA}; int ans[] = {0xAA};
...@@ -32,7 +32,7 @@ TEST(BytesRange, OneByteFL) ...@@ -32,7 +32,7 @@ TEST(BytesRange, OneByteFL)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(BytesRange, OneByteLF) TEST(Bytes, OneByteLF)
{ {
unsigned char src[] = {0xAA}; unsigned char src[] = {0xAA};
int ans[] = {0xAA}; int ans[] = {0xAA};
...@@ -45,7 +45,7 @@ TEST(BytesRange, OneByteLF) ...@@ -45,7 +45,7 @@ TEST(BytesRange, OneByteLF)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(BytesRange, OneIntDefault) TEST(Bytes, OneIntDefault)
{ {
int src[] = {0x12345678}; int src[] = {0x12345678};
int ans[] = {0x78,0x56,0x34,0x12}; int ans[] = {0x78,0x56,0x34,0x12};
...@@ -56,7 +56,7 @@ TEST(BytesRange, OneIntDefault) ...@@ -56,7 +56,7 @@ TEST(BytesRange, OneIntDefault)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(BytesRange, OneIntFL) TEST(Bytes, OneIntFL)
{ {
int src[] = {0x12345678}; int src[] = {0x12345678};
int ans[] = {0x78,0x56,0x34,0x12}; int ans[] = {0x78,0x56,0x34,0x12};
...@@ -67,7 +67,7 @@ TEST(BytesRange, OneIntFL) ...@@ -67,7 +67,7 @@ TEST(BytesRange, OneIntFL)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(BytesRange, OneIntLF) TEST(Bytes, OneIntLF)
{ {
int src[] = {0x12345678}; int src[] = {0x12345678};
int ans[] = {0x12,0x34,0x56,0x78}; int ans[] = {0x12,0x34,0x56,0x78};
...@@ -80,7 +80,7 @@ TEST(BytesRange, OneIntLF) ...@@ -80,7 +80,7 @@ TEST(BytesRange, OneIntLF)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(BytesRange, IntsDefault) TEST(Bytes, IntsDefault)
{ {
unsigned src[] = {0x12345678, 0xAABBCCDD}; unsigned src[] = {0x12345678, 0xAABBCCDD};
int ans[] = int ans[] =
...@@ -95,7 +95,7 @@ TEST(BytesRange, IntsDefault) ...@@ -95,7 +95,7 @@ TEST(BytesRange, IntsDefault)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(BytesRange, IntsFL) TEST(Bytes, IntsFL)
{ {
unsigned src[] = {0x12345678, 0xAABBCCDD}; unsigned src[] = {0x12345678, 0xAABBCCDD};
int ans[] = int ans[] =
...@@ -110,7 +110,7 @@ TEST(BytesRange, IntsFL) ...@@ -110,7 +110,7 @@ TEST(BytesRange, IntsFL)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(BytesRange, IntsLF) TEST(Bytes, IntsLF)
{ {
unsigned src[] = {0x12345678, 0xAABBCCDD}; unsigned src[] = {0x12345678, 0xAABBCCDD};
int ans[] = int ans[] =
......
...@@ -23,35 +23,35 @@ SET ( ...@@ -23,35 +23,35 @@ SET (
${PROJECT_SOURCE_DIR}/test/AllTest.cpp ${PROJECT_SOURCE_DIR}/test/AllTest.cpp
${PROJECT_SOURCE_DIR}/test/AnyTest.cpp ${PROJECT_SOURCE_DIR}/test/AnyTest.cpp
${PROJECT_SOURCE_DIR}/test/AvgTest.cpp ${PROJECT_SOURCE_DIR}/test/AvgTest.cpp
${PROJECT_SOURCE_DIR}/test/BitsRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/BitsTest.cpp
${PROJECT_SOURCE_DIR}/test/BytesRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/BytesTest.cpp
${PROJECT_SOURCE_DIR}/test/ConcatRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/ConcatTest.cpp
${PROJECT_SOURCE_DIR}/test/ContainsTest.cpp ${PROJECT_SOURCE_DIR}/test/ContainsTest.cpp
${PROJECT_SOURCE_DIR}/test/CountTest.cpp ${PROJECT_SOURCE_DIR}/test/CountTest.cpp
${PROJECT_SOURCE_DIR}/test/DistinctRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/DistinctTest.cpp
${PROJECT_SOURCE_DIR}/test/DotCallTest.cpp ${PROJECT_SOURCE_DIR}/test/DotCallTest.cpp
${PROJECT_SOURCE_DIR}/test/ElementAtTest.cpp ${PROJECT_SOURCE_DIR}/test/ElementAtTest.cpp
${PROJECT_SOURCE_DIR}/test/ForeachTest.cpp ${PROJECT_SOURCE_DIR}/test/ForEachTest.cpp
${PROJECT_SOURCE_DIR}/test/GroupByTest.cpp ${PROJECT_SOURCE_DIR}/test/GroupByTest.cpp
${PROJECT_SOURCE_DIR}/test/IterRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/CtorTest.cpp
${PROJECT_SOURCE_DIR}/test/LinqTest.cpp ${PROJECT_SOURCE_DIR}/test/LinqTest.cpp
${PROJECT_SOURCE_DIR}/test/MaxTest.cpp ${PROJECT_SOURCE_DIR}/test/MaxTest.cpp
${PROJECT_SOURCE_DIR}/test/MinTest.cpp ${PROJECT_SOURCE_DIR}/test/MinTest.cpp
${PROJECT_SOURCE_DIR}/test/OrderByRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/OrderByTest.cpp
${PROJECT_SOURCE_DIR}/test/ReverseRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/ReverseTest.cpp
${PROJECT_SOURCE_DIR}/test/SelectRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/SelectTest.cpp
${PROJECT_SOURCE_DIR}/test/SkipRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/SkipTest.cpp
${PROJECT_SOURCE_DIR}/test/SkipWhileRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/SkipWhileTest.cpp
${PROJECT_SOURCE_DIR}/test/SumTest.cpp ${PROJECT_SOURCE_DIR}/test/SumTest.cpp
${PROJECT_SOURCE_DIR}/test/TakeRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/TakeTest.cpp
${PROJECT_SOURCE_DIR}/test/TakeWhileRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/TakeWhileTest.cpp
${PROJECT_SOURCE_DIR}/test/ToDequeTest.cpp ${PROJECT_SOURCE_DIR}/test/ToStdDequeTest.cpp
${PROJECT_SOURCE_DIR}/test/ToListTest.cpp ${PROJECT_SOURCE_DIR}/test/ToStdListTest.cpp
${PROJECT_SOURCE_DIR}/test/ToSetTest.cpp ${PROJECT_SOURCE_DIR}/test/ToStdSetTest.cpp
${PROJECT_SOURCE_DIR}/test/ToVectorTest.cpp ${PROJECT_SOURCE_DIR}/test/ToStdVectorTest.cpp
${PROJECT_SOURCE_DIR}/test/UnbitsRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/UnbitsTest.cpp
${PROJECT_SOURCE_DIR}/test/UnbytesRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/UnbytesTest.cpp
${PROJECT_SOURCE_DIR}/test/WhereRangeTest.cpp ${PROJECT_SOURCE_DIR}/test/WhereTest.cpp
) )
ADD_EXECUTABLE ( ADD_EXECUTABLE (
boolinqtest boolinqtest
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
using namespace boolinq; using namespace boolinq;
TEST(ConcatRange, ArrayArray) TEST(Concat, ArrayArray)
{ {
int src1[] = {1,2,3,4,5}; int src1[] = {1,2,3,4,5};
int src2[] = {6,7,8,9}; int src2[] = {6,7,8,9};
...@@ -19,7 +19,7 @@ TEST(ConcatRange, ArrayArray) ...@@ -19,7 +19,7 @@ TEST(ConcatRange, ArrayArray)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(ConcatRange, ArrayVector) TEST(Concat, ArrayVector)
{ {
int src1[] = {1,2,3,4,5}; int src1[] = {1,2,3,4,5};
std::vector<int> src2; std::vector<int> src2;
...@@ -37,7 +37,7 @@ TEST(ConcatRange, ArrayVector) ...@@ -37,7 +37,7 @@ TEST(ConcatRange, ArrayVector)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(ConcatRange, ArrayVectorArray) TEST(Concat, ArrayVectorArray)
{ {
int src1[] = {1,2,3,4,5}; int src1[] = {1,2,3,4,5};
std::vector<int> src2; std::vector<int> src2;
......
...@@ -15,7 +15,7 @@ using namespace boolinq; ...@@ -15,7 +15,7 @@ using namespace boolinq;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(IterRange, ListInt) TEST(Ctor, ListInt)
{ {
std::list<int> lst; std::list<int> lst;
lst.push_back(1); lst.push_back(1);
...@@ -31,7 +31,7 @@ TEST(IterRange, ListInt) ...@@ -31,7 +31,7 @@ TEST(IterRange, ListInt)
CheckRangeEqArray(from(lst.cbegin(), lst.cend()), ans); CheckRangeEqArray(from(lst.cbegin(), lst.cend()), ans);
} }
TEST(IterRange, DequeInt) TEST(Ctor, DequeInt)
{ {
std::deque<int> dck; std::deque<int> dck;
dck.push_back(1); dck.push_back(1);
...@@ -47,7 +47,7 @@ TEST(IterRange, DequeInt) ...@@ -47,7 +47,7 @@ TEST(IterRange, DequeInt)
CheckRangeEqArray(from(dck.cbegin(), dck.cend()), ans); CheckRangeEqArray(from(dck.cbegin(), dck.cend()), ans);
} }
TEST(IterRange, VectorInt) TEST(Ctor, VectorInt)
{ {
std::vector<int> vec; std::vector<int> vec;
vec.push_back(1); vec.push_back(1);
...@@ -63,7 +63,7 @@ TEST(IterRange, VectorInt) ...@@ -63,7 +63,7 @@ TEST(IterRange, VectorInt)
CheckRangeEqArray(from(vec.cbegin(), vec.cend()), ans); CheckRangeEqArray(from(vec.cbegin(), vec.cend()), ans);
} }
TEST(IterRange, SetInt) TEST(Ctor, SetInt)
{ {
std::set<int> set = {1,2,3,4,5}; std::set<int> set = {1,2,3,4,5};
int ans[] = {1,2,3,4,5}; int ans[] = {1,2,3,4,5};
...@@ -73,7 +73,7 @@ TEST(IterRange, SetInt) ...@@ -73,7 +73,7 @@ TEST(IterRange, SetInt)
CheckRangeEqSet(from(set.cbegin(), set.cend()), ans); CheckRangeEqSet(from(set.cbegin(), set.cend()), ans);
} }
//TEST(IterRange, MapInt) //TEST(Ctor, MapInt)
//{ //{
// std::map<int, int> map = {{5,1},{4,2},{3,3},{2,4},{1,5}}; // std::map<int, int> map = {{5,1},{4,2},{3,3},{2,4},{1,5}};
// std::pair<int, int> ans[] = {{5,1},{4,2},{3,3},{2,4},{1,5}}; // std::pair<int, int> ans[] = {{5,1},{4,2},{3,3},{2,4},{1,5}};
...@@ -86,7 +86,7 @@ TEST(IterRange, SetInt) ...@@ -86,7 +86,7 @@ TEST(IterRange, SetInt)
// .orderBy([](std::pair<int,int> p){ return p.second; }), ans); // .orderBy([](std::pair<int,int> p){ return p.second; }), ans);
//} //}
TEST(IterRange, StdArrayInt) TEST(Ctor, StdArrayInt)
{ {
std::array<int, 5> arr = { {1,2,3,4,5} }; std::array<int, 5> arr = { {1,2,3,4,5} };
int ans[] = {1,2,3,4,5}; int ans[] = {1,2,3,4,5};
...@@ -96,7 +96,7 @@ TEST(IterRange, StdArrayInt) ...@@ -96,7 +96,7 @@ TEST(IterRange, StdArrayInt)
CheckRangeEqArray(from(arr.cbegin(), arr.cend()), ans); CheckRangeEqArray(from(arr.cbegin(), arr.cend()), ans);
} }
TEST(IterRange, ArrayInt) TEST(Ctor, ArrayInt)
{ {
int arr[] = {1,2,3,4,5}; int arr[] = {1,2,3,4,5};
int * ptr = static_cast<int *>(arr); int * ptr = static_cast<int *>(arr);
...@@ -110,7 +110,7 @@ TEST(IterRange, ArrayInt) ...@@ -110,7 +110,7 @@ TEST(IterRange, ArrayInt)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(IterRange, OneElement) TEST(Ctor, OneElement)
{ {
int src[] = {5}; int src[] = {5};
int ans[] = {5}; int ans[] = {5};
...@@ -120,7 +120,7 @@ TEST(IterRange, OneElement) ...@@ -120,7 +120,7 @@ TEST(IterRange, OneElement)
CheckRangeEqArray(rng, ans); CheckRangeEqArray(rng, ans);
} }
TEST(IterRange, EmptyVector) TEST(Ctor, EmptyVector)
{ {
std::vector<int> src; std::vector<int> src;
......
...@@ -10,7 +10,7 @@ using namespace boolinq; ...@@ -10,7 +10,7 @@ using namespace boolinq;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(DistinctRange, Ints1to6) TEST(Distinct, Ints1to6)
{ {
int src[] = {4,5,3,1,4,2,1,4,6}; int src[] = {4,5,3,1,4,2,1,4,6};
int ans[] = {1,2,3,4,5,6}; int ans[] = {1,2,3,4,5,6};
...@@ -21,7 +21,7 @@ TEST(DistinctRange, Ints1to6) ...@@ -21,7 +21,7 @@ TEST(DistinctRange, Ints1to6)
CheckRangeEqSet(dst, ans); CheckRangeEqSet(dst, ans);
} }
TEST(DistinctRange, IntMirrorFront) TEST(Distinct, IntMirrorFront)
{ {
int src[] = {3,2,1,0,1,2,3}; int src[] = {3,2,1,0,1,2,3};
int ans[] = {0,1,2,3}; int ans[] = {0,1,2,3};
...@@ -32,7 +32,7 @@ TEST(DistinctRange, IntMirrorFront) ...@@ -32,7 +32,7 @@ TEST(DistinctRange, IntMirrorFront)
CheckRangeEqSet(dst, ans); CheckRangeEqSet(dst, ans);
} }
TEST(DistinctRange, ManyEqualsFront) TEST(Distinct, ManyEqualsFront)
{ {
int src[] = {1,1,1,1}; int src[] = {1,1,1,1};
int ans[] = {1}; int ans[] = {1};
...@@ -43,7 +43,7 @@ TEST(DistinctRange, ManyEqualsFront) ...@@ -43,7 +43,7 @@ TEST(DistinctRange, ManyEqualsFront)
CheckRangeEqSet(dst, ans); CheckRangeEqSet(dst, ans);
} }
TEST(DistinctRange, ManyEqualsWithOneFront) TEST(Distinct, ManyEqualsWithOneFront)
{ {
int src[] = {1,1,2,1}; int src[] = {1,1,2,1};
int ans[] = {1,2}; int ans[] = {1,2};
...@@ -54,7 +54,7 @@ TEST(DistinctRange, ManyEqualsWithOneFront) ...@@ -54,7 +54,7 @@ TEST(DistinctRange, ManyEqualsWithOneFront)
CheckRangeEqSet(dst, ans); CheckRangeEqSet(dst, ans);
} }
TEST(DistinctRange, OneFieldFront) TEST(Distinct, OneFieldFront)
{ {
struct Man struct Man
{ {
......
...@@ -10,7 +10,7 @@ using namespace boolinq; ...@@ -10,7 +10,7 @@ using namespace boolinq;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(GroupByRange, Ints) TEST(GroupBy, Ints)
{ {
int arr[] = {0,1,2,3,4,5,6,7,8,9}; int arr[] = {0,1,2,3,4,5,6,7,8,9};
...@@ -32,7 +32,7 @@ TEST(GroupByRange, Ints) ...@@ -32,7 +32,7 @@ TEST(GroupByRange, Ints)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(GroupByRange, CountChildrenByAge) TEST(GroupBy, CountChildrenByAge)
{ {
struct Child struct Child
{ {
......
...@@ -246,7 +246,7 @@ TEST(Linq, Creations) ...@@ -246,7 +246,7 @@ TEST(Linq, Creations)
vec.push_back(4); vec.push_back(4);
vec.push_back(5); vec.push_back(5);
int arr[] = {1,2,3,4,5}; int arr[] = {1,2,3,4,5};
//const int carr[] = {1,2,3,4,5}; // const int carr[] = {1,2,3,4,5};
int * ptr = static_cast<int *>(arr); int * ptr = static_cast<int *>(arr);
//const int * cptr = const_cast<int *>(arr); //const int * cptr = const_cast<int *>(arr);
......
...@@ -10,7 +10,7 @@ using namespace boolinq; ...@@ -10,7 +10,7 @@ using namespace boolinq;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(OrderByRange, RandomIntsWithDuplicates) TEST(OrderBy, RandomIntsWithDuplicates)
{ {
int src[] = {4,5,3,1,4,2,1,4,6}; int src[] = {4,5,3,1,4,2,1,4,6};
int ans[] = {1,1,2,3,4,4,4,5,6}; int ans[] = {1,1,2,3,4,4,4,5,6};
...@@ -21,7 +21,7 @@ TEST(OrderByRange, RandomIntsWithDuplicates) ...@@ -21,7 +21,7 @@ TEST(OrderByRange, RandomIntsWithDuplicates)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(OrderByRange, ReverseInts) TEST(OrderBy, ReverseInts)
{ {
int src[] = {4,3,2,1}; int src[] = {4,3,2,1};
int ans[] = {1,2,3,4}; int ans[] = {1,2,3,4};
...@@ -32,7 +32,7 @@ TEST(OrderByRange, ReverseInts) ...@@ -32,7 +32,7 @@ TEST(OrderByRange, ReverseInts)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(OrderByRange, ThreeElements) TEST(OrderBy, ThreeElements)
{ {
int src[] = {1,3,2}; int src[] = {1,3,2};
int ans[] = {1,2,3}; int ans[] = {1,2,3};
...@@ -45,7 +45,7 @@ TEST(OrderByRange, ThreeElements) ...@@ -45,7 +45,7 @@ TEST(OrderByRange, ThreeElements)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(OrderByRange, OneElement) TEST(OrderBy, OneElement)
{ {
int src[] = {5}; int src[] = {5};
int ans[] = {5}; int ans[] = {5};
...@@ -56,7 +56,7 @@ TEST(OrderByRange, OneElement) ...@@ -56,7 +56,7 @@ TEST(OrderByRange, OneElement)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(OrderByRange, NoElements) TEST(OrderBy, NoElements)
{ {
std::vector<int> src; std::vector<int> src;
...@@ -68,7 +68,7 @@ TEST(OrderByRange, NoElements) ...@@ -68,7 +68,7 @@ TEST(OrderByRange, NoElements)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(OrderByRange, RandomStringByContent) TEST(OrderBy, RandomStringByContent)
{ {
std::string src[] = std::string src[] =
{ {
...@@ -96,7 +96,7 @@ TEST(OrderByRange, RandomStringByContent) ...@@ -96,7 +96,7 @@ TEST(OrderByRange, RandomStringByContent)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(OrderByRange, RandomStringByLength) TEST(OrderBy, RandomStringByLength)
{ {
std::string src[] = std::string src[] =
{ {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
using namespace boolinq; using namespace boolinq;
TEST(ReverseRange, IntVector) TEST(Reverse, IntVector)
{ {
int src[] = {1,2,3,4}; int src[] = {1,2,3,4};
int ans[] = {4,3,2,1}; int ans[] = {4,3,2,1};
...@@ -21,7 +21,7 @@ TEST(ReverseRange, IntVector) ...@@ -21,7 +21,7 @@ TEST(ReverseRange, IntVector)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(ReverseRange, DoubleReverse) TEST(Reverse, DoubleReverse)
{ {
int src[] = {1,2,3,4}; int src[] = {1,2,3,4};
int ans[] = {1,2,3,4}; int ans[] = {1,2,3,4};
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
using namespace boolinq; using namespace boolinq;
TEST(SelectRange, Mul2) TEST(Select, Mul2)
{ {
int src[] = {1,2,3,4}; int src[] = {1,2,3,4};
int ans[] = {2,4,6,8}; int ans[] = {2,4,6,8};
...@@ -19,7 +19,7 @@ TEST(SelectRange, Mul2) ...@@ -19,7 +19,7 @@ TEST(SelectRange, Mul2)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(SelectRange, MakeChar) TEST(Select, MakeChar)
{ {
int src[] = {1,2,3,4}; int src[] = {1,2,3,4};
char ans[] = {'1','2','3','4'}; char ans[] = {'1','2','3','4'};
...@@ -30,7 +30,7 @@ TEST(SelectRange, MakeChar) ...@@ -30,7 +30,7 @@ TEST(SelectRange, MakeChar)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(SelectRange, MakeString) TEST(Select, MakeString)
{ {
int src[] = {1,2,3,4}; int src[] = {1,2,3,4};
......
...@@ -10,7 +10,7 @@ using namespace boolinq; ...@@ -10,7 +10,7 @@ using namespace boolinq;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(SkipRange, ManyToMany) TEST(Skip, ManyToMany)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {1,2,3,4,5,6}; int ans[] = {1,2,3,4,5,6};
...@@ -21,7 +21,7 @@ TEST(SkipRange, ManyToMany) ...@@ -21,7 +21,7 @@ TEST(SkipRange, ManyToMany)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(SkipRange, ManyToLess) TEST(Skip, ManyToLess)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {4,5,6}; int ans[] = {4,5,6};
...@@ -32,7 +32,7 @@ TEST(SkipRange, ManyToLess) ...@@ -32,7 +32,7 @@ TEST(SkipRange, ManyToLess)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(SkipRange, ManyToOne) TEST(Skip, ManyToOne)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {6}; int ans[] = {6};
...@@ -43,7 +43,7 @@ TEST(SkipRange, ManyToOne) ...@@ -43,7 +43,7 @@ TEST(SkipRange, ManyToOne)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(SkipRange, ManyToZero) TEST(Skip, ManyToZero)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
...@@ -53,7 +53,7 @@ TEST(SkipRange, ManyToZero) ...@@ -53,7 +53,7 @@ TEST(SkipRange, ManyToZero)
EXPECT_THROW(dst.next(), LinqEndException); EXPECT_THROW(dst.next(), LinqEndException);
} }
TEST(SkipRange, ManyToZeroLess) TEST(Skip, ManyToZeroLess)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
...@@ -65,7 +65,7 @@ TEST(SkipRange, ManyToZeroLess) ...@@ -65,7 +65,7 @@ TEST(SkipRange, ManyToZeroLess)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(SkipRange, OneToOne) TEST(Skip, OneToOne)
{ {
int src[] = {5}; int src[] = {5};
int ans[] = {5}; int ans[] = {5};
...@@ -76,7 +76,7 @@ TEST(SkipRange, OneToOne) ...@@ -76,7 +76,7 @@ TEST(SkipRange, OneToOne)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(SkipRange, OneToZero) TEST(Skip, OneToZero)
{ {
int src[] = {5}; int src[] = {5};
...@@ -86,7 +86,7 @@ TEST(SkipRange, OneToZero) ...@@ -86,7 +86,7 @@ TEST(SkipRange, OneToZero)
EXPECT_THROW(dst.next(), LinqEndException); EXPECT_THROW(dst.next(), LinqEndException);
} }
TEST(SkipRange, OneToZeroLess) TEST(Skip, OneToZeroLess)
{ {
int src[] = {5}; int src[] = {5};
...@@ -96,7 +96,7 @@ TEST(SkipRange, OneToZeroLess) ...@@ -96,7 +96,7 @@ TEST(SkipRange, OneToZeroLess)
EXPECT_THROW(dst.next(), LinqEndException); EXPECT_THROW(dst.next(), LinqEndException);
} }
TEST(SkipRange, ZeroToZero) TEST(Skip, ZeroToZero)
{ {
std::vector<int> src; std::vector<int> src;
...@@ -106,7 +106,7 @@ TEST(SkipRange, ZeroToZero) ...@@ -106,7 +106,7 @@ TEST(SkipRange, ZeroToZero)
EXPECT_THROW(rng.next(), LinqEndException); EXPECT_THROW(rng.next(), LinqEndException);
} }
TEST(SkipRange, ZeroToZeroLess) TEST(Skip, ZeroToZeroLess)
{ {
std::vector<int> src; std::vector<int> src;
......
...@@ -10,7 +10,7 @@ using namespace boolinq; ...@@ -10,7 +10,7 @@ using namespace boolinq;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(SkipWhileRange, ManyToMore) TEST(SkipWhile, ManyToMore)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {1,2,3,4,5,6}; int ans[] = {1,2,3,4,5,6};
...@@ -54,7 +54,7 @@ TEST(SkipWhileRange_i, ManyToMoreByIndexAndItemValue) ...@@ -54,7 +54,7 @@ TEST(SkipWhileRange_i, ManyToMoreByIndexAndItemValue)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(SkipWhileRange, ManyToMany) TEST(SkipWhile, ManyToMany)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {1,2,3,4,5,6}; int ans[] = {1,2,3,4,5,6};
...@@ -99,7 +99,7 @@ TEST(SkipWhileRange_i, ManyToManyByIndexAndItemValue) ...@@ -99,7 +99,7 @@ TEST(SkipWhileRange_i, ManyToManyByIndexAndItemValue)
} }
TEST(SkipWhileRange, ManyToLess) TEST(SkipWhile, ManyToLess)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {3,4,5,6}; int ans[] = {3,4,5,6};
...@@ -143,7 +143,7 @@ TEST(SkipWhileRange_i, ManyToLessByIndexAndItemValue) ...@@ -143,7 +143,7 @@ TEST(SkipWhileRange_i, ManyToLessByIndexAndItemValue)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(SkipWhileRange, ManyToOne) TEST(SkipWhile, ManyToOne)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {6}; int ans[] = {6};
...@@ -187,7 +187,7 @@ TEST(SkipWhileRange_i, ManyToOneByIndexAndItemValue) ...@@ -187,7 +187,7 @@ TEST(SkipWhileRange_i, ManyToOneByIndexAndItemValue)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(SkipWhileRange, ManyToZero) TEST(SkipWhile, ManyToZero)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
...@@ -229,7 +229,7 @@ TEST(SkipWhileRange_i, ManyToZeroIndexAndItemValue) ...@@ -229,7 +229,7 @@ TEST(SkipWhileRange_i, ManyToZeroIndexAndItemValue)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(SkipWhileRange, OneToOne) TEST(SkipWhile, OneToOne)
{ {
int src[] = {5}; int src[] = {5};
int ans[] = {5}; int ans[] = {5};
...@@ -273,7 +273,7 @@ TEST(SkipWhileRange_i, OneToOneByIndexAndItemValue) ...@@ -273,7 +273,7 @@ TEST(SkipWhileRange_i, OneToOneByIndexAndItemValue)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(SkipWhileRange, OneToZero) TEST(SkipWhile, OneToZero)
{ {
int src[] = {5}; int src[] = {5};
...@@ -313,7 +313,7 @@ TEST(SkipWhileRange_i, OneToZeroIndexAndItemValue) ...@@ -313,7 +313,7 @@ TEST(SkipWhileRange_i, OneToZeroIndexAndItemValue)
EXPECT_THROW(dst.next(), LinqEndException); EXPECT_THROW(dst.next(), LinqEndException);
} }
TEST(SkipWhileRange, ZeroToZero) TEST(SkipWhile, ZeroToZero)
{ {
std::vector<int> src; std::vector<int> src;
......
...@@ -10,7 +10,7 @@ using namespace boolinq; ...@@ -10,7 +10,7 @@ using namespace boolinq;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(TakeRange, ManyToMore) TEST(Take, ManyToMore)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {1,2,3,4,5,6}; int ans[] = {1,2,3,4,5,6};
...@@ -21,7 +21,7 @@ TEST(TakeRange, ManyToMore) ...@@ -21,7 +21,7 @@ TEST(TakeRange, ManyToMore)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(TakeRange, ManyToMany) TEST(Take, ManyToMany)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {1,2,3,4,5,6}; int ans[] = {1,2,3,4,5,6};
...@@ -32,7 +32,7 @@ TEST(TakeRange, ManyToMany) ...@@ -32,7 +32,7 @@ TEST(TakeRange, ManyToMany)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(TakeRange, ManyToLess) TEST(Take, ManyToLess)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {1,2,3}; int ans[] = {1,2,3};
...@@ -43,7 +43,7 @@ TEST(TakeRange, ManyToLess) ...@@ -43,7 +43,7 @@ TEST(TakeRange, ManyToLess)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(TakeRange, ManyToOne) TEST(Take, ManyToOne)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {1}; int ans[] = {1};
...@@ -54,7 +54,7 @@ TEST(TakeRange, ManyToOne) ...@@ -54,7 +54,7 @@ TEST(TakeRange, ManyToOne)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(TakeRange, ManyToZero) TEST(Take, ManyToZero)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
...@@ -66,7 +66,7 @@ TEST(TakeRange, ManyToZero) ...@@ -66,7 +66,7 @@ TEST(TakeRange, ManyToZero)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(TakeRange, OneToMore) TEST(Take, OneToMore)
{ {
int src[] = {5}; int src[] = {5};
int ans[] = {5}; int ans[] = {5};
...@@ -77,7 +77,7 @@ TEST(TakeRange, OneToMore) ...@@ -77,7 +77,7 @@ TEST(TakeRange, OneToMore)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(TakeRange, OneToOne) TEST(Take, OneToOne)
{ {
int src[] = {5}; int src[] = {5};
int ans[] = {5}; int ans[] = {5};
...@@ -88,7 +88,7 @@ TEST(TakeRange, OneToOne) ...@@ -88,7 +88,7 @@ TEST(TakeRange, OneToOne)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(TakeRange, OneToZero) TEST(Take, OneToZero)
{ {
int src[] = {5}; int src[] = {5};
...@@ -98,7 +98,7 @@ TEST(TakeRange, OneToZero) ...@@ -98,7 +98,7 @@ TEST(TakeRange, OneToZero)
EXPECT_THROW(dst.next(), LinqEndException); EXPECT_THROW(dst.next(), LinqEndException);
} }
TEST(TakeRange, ZeroToZero) TEST(Take, ZeroToZero)
{ {
std::vector<int> src; std::vector<int> src;
......
...@@ -10,7 +10,7 @@ using namespace boolinq; ...@@ -10,7 +10,7 @@ using namespace boolinq;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(TakeWhileRange, ManyToMore) TEST(TakeWhile, ManyToMore)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {1,2,3,4,5,6}; int ans[] = {1,2,3,4,5,6};
...@@ -54,7 +54,7 @@ TEST(TakeWhileRange_i, ManyToMoreByIndexAndItemValue) ...@@ -54,7 +54,7 @@ TEST(TakeWhileRange_i, ManyToMoreByIndexAndItemValue)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(TakeWhileRange, ManyToMany) TEST(TakeWhile, ManyToMany)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {1,2,3,4,5,6}; int ans[] = {1,2,3,4,5,6};
...@@ -98,7 +98,7 @@ TEST(TakeWhileRange_i, ManyToManyByIndexAndItemValue) ...@@ -98,7 +98,7 @@ TEST(TakeWhileRange_i, ManyToManyByIndexAndItemValue)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(TakeWhileRange, ManyToLess) TEST(TakeWhile, ManyToLess)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {1,2,3}; int ans[] = {1,2,3};
...@@ -142,7 +142,7 @@ TEST(TakeWhileRange_i, ManyToLessByIndexAndItemValue) ...@@ -142,7 +142,7 @@ TEST(TakeWhileRange_i, ManyToLessByIndexAndItemValue)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(TakeWhileRange, ManyToOne) TEST(TakeWhile, ManyToOne)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {1}; int ans[] = {1};
...@@ -186,7 +186,7 @@ TEST(TakeWhileRange_i, ManyToOneByIndexAndItemValue) ...@@ -186,7 +186,7 @@ TEST(TakeWhileRange_i, ManyToOneByIndexAndItemValue)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(TakeWhileRange, ManyToZero) TEST(TakeWhile, ManyToZero)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
...@@ -228,7 +228,7 @@ TEST(TakeWhileRange_i, ManyToZeroByIdexAndItemValue) ...@@ -228,7 +228,7 @@ TEST(TakeWhileRange_i, ManyToZeroByIdexAndItemValue)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(TakeWhileRange, OneToOne) TEST(TakeWhile, OneToOne)
{ {
int src[] = {5}; int src[] = {5};
int ans[] = {5}; int ans[] = {5};
...@@ -272,7 +272,7 @@ TEST(TakeWhileRange_i, OneToOneByIndexAndItemValue) ...@@ -272,7 +272,7 @@ TEST(TakeWhileRange_i, OneToOneByIndexAndItemValue)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(TakeWhileRange, OneToZero) TEST(TakeWhile, OneToZero)
{ {
int src[] = {5}; int src[] = {5};
...@@ -312,7 +312,7 @@ TEST(TakeWhileRange_i, OneToZeroByIndexAndItemValue) ...@@ -312,7 +312,7 @@ TEST(TakeWhileRange_i, OneToZeroByIndexAndItemValue)
EXPECT_THROW(dst.next(), LinqEndException); EXPECT_THROW(dst.next(), LinqEndException);
} }
TEST(TakeWhileRange, ZeroToZero) TEST(TakeWhile, ZeroToZero)
{ {
std::vector<int> src; std::vector<int> src;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
using namespace boolinq; using namespace boolinq;
TEST(toStdDeque, Deque2Deque) TEST(ToStdDeque, Deque2Deque)
{ {
std::deque<int> src; std::deque<int> src;
src.push_back(100); src.push_back(100);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
using namespace boolinq; using namespace boolinq;
TEST(toStdList, List2List) TEST(ToStdList, List2List)
{ {
std::list<int> src; std::list<int> src;
src.push_back(100); src.push_back(100);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
using namespace boolinq; using namespace boolinq;
TEST(toStdSet, Vector2Set) TEST(ToStdSet, Vector2Set)
{ {
std::vector<int> src; std::vector<int> src;
src.push_back(1); src.push_back(1);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
using namespace boolinq; using namespace boolinq;
TEST(toStdVector, Vector2Vector) TEST(ToStdVector, Vector2Vector)
{ {
std::vector<int> src; std::vector<int> src;
src.push_back(100); src.push_back(100);
......
...@@ -10,7 +10,7 @@ using namespace boolinq; ...@@ -10,7 +10,7 @@ using namespace boolinq;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(UnbitsRange, OneByteDefault) TEST(Unbits, OneByteDefault)
{ {
int src[] = {1,0,1,0,1,0,1,0}; int src[] = {1,0,1,0,1,0,1,0};
int ans[] = {0xAA}; int ans[] = {0xAA};
...@@ -21,7 +21,7 @@ TEST(UnbitsRange, OneByteDefault) ...@@ -21,7 +21,7 @@ TEST(UnbitsRange, OneByteDefault)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(UnbitsRange, OneByteHL) TEST(Unbits, OneByteHL)
{ {
int src[] = {1,0,1,0,1,0,1,0}; int src[] = {1,0,1,0,1,0,1,0};
int ans[] = {0xAA}; int ans[] = {0xAA};
...@@ -32,7 +32,7 @@ TEST(UnbitsRange, OneByteHL) ...@@ -32,7 +32,7 @@ TEST(UnbitsRange, OneByteHL)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(UnbitsRange, OneByteLH) TEST(Unbits, OneByteLH)
{ {
int src[] = {0,1,0,1,0,1,0,1}; int src[] = {0,1,0,1,0,1,0,1};
int ans[] = {0xAA}; int ans[] = {0xAA};
......
...@@ -10,7 +10,7 @@ using namespace boolinq; ...@@ -10,7 +10,7 @@ using namespace boolinq;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(UnbytesRange, OneIntDefault) TEST(Unbytes, OneIntDefault)
{ {
unsigned char src[] = {0xAA,0xBB,0xCC,0xDD}; unsigned char src[] = {0xAA,0xBB,0xCC,0xDD};
unsigned ans[] = {0xDDCCBBAA}; unsigned ans[] = {0xDDCCBBAA};
...@@ -21,7 +21,7 @@ TEST(UnbytesRange, OneIntDefault) ...@@ -21,7 +21,7 @@ TEST(UnbytesRange, OneIntDefault)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(UnbytesRange, OneIntFL) TEST(Unbytes, OneIntFL)
{ {
unsigned char src[] = {0xAA,0xBB,0xCC,0xDD}; unsigned char src[] = {0xAA,0xBB,0xCC,0xDD};
unsigned ans[] = {0xDDCCBBAA}; unsigned ans[] = {0xDDCCBBAA};
...@@ -32,7 +32,7 @@ TEST(UnbytesRange, OneIntFL) ...@@ -32,7 +32,7 @@ TEST(UnbytesRange, OneIntFL)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(UnbytesRange, OneIntLF) TEST(Unbytes, OneIntLF)
{ {
unsigned char src[] = {0xAA,0xBB,0xCC,0xDD}; unsigned char src[] = {0xAA,0xBB,0xCC,0xDD};
unsigned ans[] = {0xAABBCCDD}; unsigned ans[] = {0xAABBCCDD};
...@@ -45,7 +45,7 @@ TEST(UnbytesRange, OneIntLF) ...@@ -45,7 +45,7 @@ TEST(UnbytesRange, OneIntLF)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(UnbytesRange, TwoIntsDefault) TEST(Unbytes, TwoIntsDefault)
{ {
unsigned char src[] = unsigned char src[] =
{ {
...@@ -60,7 +60,7 @@ TEST(UnbytesRange, TwoIntsDefault) ...@@ -60,7 +60,7 @@ TEST(UnbytesRange, TwoIntsDefault)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(UnbytesRange, TwoIntsFL) TEST(Unbytes, TwoIntsFL)
{ {
unsigned char src[] = unsigned char src[] =
{ {
...@@ -75,7 +75,7 @@ TEST(UnbytesRange, TwoIntsFL) ...@@ -75,7 +75,7 @@ TEST(UnbytesRange, TwoIntsFL)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(UnbytesRange, TwoIntsLF) TEST(Unbytes, TwoIntsLF)
{ {
unsigned char src[] = unsigned char src[] =
{ {
...@@ -92,7 +92,7 @@ TEST(UnbytesRange, TwoIntsLF) ...@@ -92,7 +92,7 @@ TEST(UnbytesRange, TwoIntsLF)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(UnbytesRange, EmptyDefault) TEST(Unbytes, EmptyDefault)
{ {
std::vector<unsigned char> src; std::vector<unsigned char> src;
......
...@@ -10,7 +10,7 @@ using namespace boolinq; ...@@ -10,7 +10,7 @@ using namespace boolinq;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(WhereRange, IntOdd) TEST(Where, IntOdd)
{ {
int src[] = {1,2,3,4,5,6}; int src[] = {1,2,3,4,5,6};
int ans[] = {1, 3, 5}; int ans[] = {1, 3, 5};
...@@ -23,7 +23,7 @@ TEST(WhereRange, IntOdd) ...@@ -23,7 +23,7 @@ TEST(WhereRange, IntOdd)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(WhereRange, FirstLetterFront) TEST(Where, FirstLetterFront)
{ {
std::string src[] = std::string src[] =
{ {
...@@ -48,7 +48,7 @@ TEST(WhereRange, FirstLetterFront) ...@@ -48,7 +48,7 @@ TEST(WhereRange, FirstLetterFront)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
TEST(WhereRange, NameAgeLess) TEST(Where, NameAgeLess)
{ {
struct NameAge struct NameAge
{ {
...@@ -79,7 +79,7 @@ TEST(WhereRange, NameAgeLess) ...@@ -79,7 +79,7 @@ TEST(WhereRange, NameAgeLess)
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
TEST(WhereRange, MayToOne) TEST(Where, MayToOne)
{ {
int src[] = {0,1,2}; int src[] = {0,1,2};
int ans[] = {1}; int ans[] = {1};
...@@ -90,7 +90,7 @@ TEST(WhereRange, MayToOne) ...@@ -90,7 +90,7 @@ TEST(WhereRange, MayToOne)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(WhereRange, OneToOne) TEST(Where, OneToOne)
{ {
int src[] = {5}; int src[] = {5};
int ans[] = {5}; int ans[] = {5};
...@@ -101,7 +101,7 @@ TEST(WhereRange, OneToOne) ...@@ -101,7 +101,7 @@ TEST(WhereRange, OneToOne)
CheckRangeEqArray(dst, ans); CheckRangeEqArray(dst, ans);
} }
TEST(WhereRange, ManyToZero) TEST(Where, ManyToZero)
{ {
int src[] = {0,1,2}; int src[] = {0,1,2};
...@@ -111,7 +111,7 @@ TEST(WhereRange, ManyToZero) ...@@ -111,7 +111,7 @@ TEST(WhereRange, ManyToZero)
EXPECT_THROW(dst.next(), LinqEndException); EXPECT_THROW(dst.next(), LinqEndException);
} }
TEST(WhereRange, OneToZero) TEST(Where, OneToZero)
{ {
int src[] = {5}; int src[] = {5};
...@@ -121,7 +121,7 @@ TEST(WhereRange, OneToZero) ...@@ -121,7 +121,7 @@ TEST(WhereRange, OneToZero)
EXPECT_THROW(dst.next(), LinqEndException); EXPECT_THROW(dst.next(), LinqEndException);
} }
TEST(WhereRange, ZeroToZero) TEST(Where, ZeroToZero)
{ {
std::vector<int> src; std::vector<int> src;
......
#include <gtest/gtest.h> #include <gtest/gtest.h>
////////////////////////////////////////////////////////////////
/*
template<class R, class T>
R find(R r, T value)
{
for (; !r.empty(); r.popFront())
if (value == r.front()) break;
return r;
}
template<class R, class T>
R find_end(R r, T value)
{
return retro(find(retro(r), value));
}
*/
////////////////////////////////////////////////////////////////
int main(int argc, char * argv[]) int main(int argc, char * argv[])
{ {
::testing::InitGoogleMock(&argc, argv); ::testing::InitGoogleMock(&argc, argv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment