Skip to content

Commit

Permalink
Rename some tests and files
Browse files Browse the repository at this point in the history
  • Loading branch information
k06a committed Jun 29, 2019
1 parent 7d8da6a commit d36208e
Show file tree
Hide file tree
Showing 23 changed files with 127 additions and 147 deletions.
18 changes: 9 additions & 9 deletions test/BitsRangeTest.cpp → test/BitsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using namespace boolinq;

//////////////////////////////////////////////////////////////////////////

TEST(BitsRange, OneByteDefault)
TEST(Bits, OneByteDefault)
{
unsigned char src[] = {0xAA};
int ans[] = {1,0,1,0,1,0,1,0};
Expand All @@ -21,7 +21,7 @@ TEST(BitsRange, OneByteDefault)
CheckRangeEqArray(dst, ans);
}

TEST(BitsRange, OneByteHL)
TEST(Bits, OneByteHL)
{
unsigned char src[] = {0xAA};
int ans[] = {1,0,1,0,1,0,1,0};
Expand All @@ -32,7 +32,7 @@ TEST(BitsRange, OneByteHL)
CheckRangeEqArray(dst, ans);
}

TEST(BitsRange, OneByteLH)
TEST(Bits, OneByteLH)
{
unsigned char src[] = {0xAA};
int ans[] = {0,1,0,1,0,1,0,1};
Expand All @@ -45,7 +45,7 @@ TEST(BitsRange, OneByteLH)

//////////////////////////////////////////////////////////////////////////

TEST(BitsRange, OneIntDefault)
TEST(Bits, OneIntDefault)
{
unsigned int src[] = {0x12345678};
int ans[] =
Expand All @@ -62,7 +62,7 @@ TEST(BitsRange, OneIntDefault)
CheckRangeEqArray(dst, ans);
}

TEST(BitsRange, OneIntHL)
TEST(Bits, OneIntHL)
{
unsigned int src[] = {0x12345678};
int ans[] =
Expand All @@ -79,7 +79,7 @@ TEST(BitsRange, OneIntHL)
CheckRangeEqArray(dst, ans);
}

TEST(BitsRange, OneIntLH)
TEST(Bits, OneIntLH)
{
unsigned int src[] = {0x12345678};
int ans[] =
Expand All @@ -99,7 +99,7 @@ TEST(BitsRange, OneIntLH)

//////////////////////////////////////////////////////////////////////////

TEST(BitsRange, IntsDefault)
TEST(Bits, IntsDefault)
{
unsigned int src[] = {0x12345678,0xAABBCCDD};
int ans[] =
Expand All @@ -121,7 +121,7 @@ TEST(BitsRange, IntsDefault)
CheckRangeEqArray(dst, ans);
}

TEST(BitsRange, IntsHL)
TEST(Bits, IntsHL)
{
unsigned int src[] = {0x12345678,0xAABBCCDD};
int ans[] =
Expand All @@ -143,7 +143,7 @@ TEST(BitsRange, IntsHL)
CheckRangeEqArray(dst, ans);
}

TEST(BitsRange, IntsLH)
TEST(Bits, IntsLH)
{
unsigned int src[] = {0x12345678,0xAABBCCDD};
int ans[] =
Expand Down
18 changes: 9 additions & 9 deletions test/BytesRangeTest.cpp → test/BytesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using namespace boolinq;

//////////////////////////////////////////////////////////////////////////

TEST(BytesRange, OneByteDefault)
TEST(Bytes, OneByteDefault)
{
unsigned char src[] = {0xAA};
int ans[] = {0xAA};
Expand All @@ -21,7 +21,7 @@ TEST(BytesRange, OneByteDefault)
CheckRangeEqArray(dst, ans);
}

TEST(BytesRange, OneByteFL)
TEST(Bytes, OneByteFL)
{
unsigned char src[] = {0xAA};
int ans[] = {0xAA};
Expand All @@ -32,7 +32,7 @@ TEST(BytesRange, OneByteFL)
CheckRangeEqArray(dst, ans);
}

TEST(BytesRange, OneByteLF)
TEST(Bytes, OneByteLF)
{
unsigned char src[] = {0xAA};
int ans[] = {0xAA};
Expand All @@ -45,7 +45,7 @@ TEST(BytesRange, OneByteLF)

//////////////////////////////////////////////////////////////////////////

TEST(BytesRange, OneIntDefault)
TEST(Bytes, OneIntDefault)
{
int src[] = {0x12345678};
int ans[] = {0x78,0x56,0x34,0x12};
Expand All @@ -56,7 +56,7 @@ TEST(BytesRange, OneIntDefault)
CheckRangeEqArray(dst, ans);
}

TEST(BytesRange, OneIntFL)
TEST(Bytes, OneIntFL)
{
int src[] = {0x12345678};
int ans[] = {0x78,0x56,0x34,0x12};
Expand All @@ -67,7 +67,7 @@ TEST(BytesRange, OneIntFL)
CheckRangeEqArray(dst, ans);
}

TEST(BytesRange, OneIntLF)
TEST(Bytes, OneIntLF)
{
int src[] = {0x12345678};
int ans[] = {0x12,0x34,0x56,0x78};
Expand All @@ -80,7 +80,7 @@ TEST(BytesRange, OneIntLF)

//////////////////////////////////////////////////////////////////////////

TEST(BytesRange, IntsDefault)
TEST(Bytes, IntsDefault)
{
unsigned src[] = {0x12345678, 0xAABBCCDD};
int ans[] =
Expand All @@ -95,7 +95,7 @@ TEST(BytesRange, IntsDefault)
CheckRangeEqArray(dst, ans);
}

TEST(BytesRange, IntsFL)
TEST(Bytes, IntsFL)
{
unsigned src[] = {0x12345678, 0xAABBCCDD};
int ans[] =
Expand All @@ -110,7 +110,7 @@ TEST(BytesRange, IntsFL)
CheckRangeEqArray(dst, ans);
}

TEST(BytesRange, IntsLF)
TEST(Bytes, IntsLF)
{
unsigned src[] = {0x12345678, 0xAABBCCDD};
int ans[] =
Expand Down
40 changes: 20 additions & 20 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,35 @@ SET (
${PROJECT_SOURCE_DIR}/test/AllTest.cpp
${PROJECT_SOURCE_DIR}/test/AnyTest.cpp
${PROJECT_SOURCE_DIR}/test/AvgTest.cpp
${PROJECT_SOURCE_DIR}/test/BitsRangeTest.cpp
${PROJECT_SOURCE_DIR}/test/BytesRangeTest.cpp
${PROJECT_SOURCE_DIR}/test/ConcatRangeTest.cpp
${PROJECT_SOURCE_DIR}/test/BitsTest.cpp
${PROJECT_SOURCE_DIR}/test/BytesTest.cpp
${PROJECT_SOURCE_DIR}/test/ConcatTest.cpp
${PROJECT_SOURCE_DIR}/test/ContainsTest.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/ElementAtTest.cpp
${PROJECT_SOURCE_DIR}/test/ForeachTest.cpp
${PROJECT_SOURCE_DIR}/test/ForEachTest.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/MaxTest.cpp
${PROJECT_SOURCE_DIR}/test/MinTest.cpp
${PROJECT_SOURCE_DIR}/test/OrderByRangeTest.cpp
${PROJECT_SOURCE_DIR}/test/ReverseRangeTest.cpp
${PROJECT_SOURCE_DIR}/test/SelectRangeTest.cpp
${PROJECT_SOURCE_DIR}/test/SkipRangeTest.cpp
${PROJECT_SOURCE_DIR}/test/SkipWhileRangeTest.cpp
${PROJECT_SOURCE_DIR}/test/OrderByTest.cpp
${PROJECT_SOURCE_DIR}/test/ReverseTest.cpp
${PROJECT_SOURCE_DIR}/test/SelectTest.cpp
${PROJECT_SOURCE_DIR}/test/SkipTest.cpp
${PROJECT_SOURCE_DIR}/test/SkipWhileTest.cpp
${PROJECT_SOURCE_DIR}/test/SumTest.cpp
${PROJECT_SOURCE_DIR}/test/TakeRangeTest.cpp
${PROJECT_SOURCE_DIR}/test/TakeWhileRangeTest.cpp
${PROJECT_SOURCE_DIR}/test/ToDequeTest.cpp
${PROJECT_SOURCE_DIR}/test/ToListTest.cpp
${PROJECT_SOURCE_DIR}/test/ToSetTest.cpp
${PROJECT_SOURCE_DIR}/test/ToVectorTest.cpp
${PROJECT_SOURCE_DIR}/test/UnbitsRangeTest.cpp
${PROJECT_SOURCE_DIR}/test/UnbytesRangeTest.cpp
${PROJECT_SOURCE_DIR}/test/WhereRangeTest.cpp
${PROJECT_SOURCE_DIR}/test/TakeTest.cpp
${PROJECT_SOURCE_DIR}/test/TakeWhileTest.cpp
${PROJECT_SOURCE_DIR}/test/ToStdDequeTest.cpp
${PROJECT_SOURCE_DIR}/test/ToStdListTest.cpp
${PROJECT_SOURCE_DIR}/test/ToStdSetTest.cpp
${PROJECT_SOURCE_DIR}/test/ToStdVectorTest.cpp
${PROJECT_SOURCE_DIR}/test/UnbitsTest.cpp
${PROJECT_SOURCE_DIR}/test/UnbytesTest.cpp
${PROJECT_SOURCE_DIR}/test/WhereTest.cpp
)
ADD_EXECUTABLE (
boolinqtest
Expand Down
6 changes: 3 additions & 3 deletions test/ConcatRangeTest.cpp → test/ConcatTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

using namespace boolinq;

TEST(ConcatRange, ArrayArray)
TEST(Concat, ArrayArray)
{
int src1[] = {1,2,3,4,5};
int src2[] = {6,7,8,9};
Expand All @@ -19,7 +19,7 @@ TEST(ConcatRange, ArrayArray)
CheckRangeEqArray(dst, ans);
}

TEST(ConcatRange, ArrayVector)
TEST(Concat, ArrayVector)
{
int src1[] = {1,2,3,4,5};
std::vector<int> src2;
Expand All @@ -37,7 +37,7 @@ TEST(ConcatRange, ArrayVector)
CheckRangeEqArray(dst, ans);
}

TEST(ConcatRange, ArrayVectorArray)
TEST(Concat, ArrayVectorArray)
{
int src1[] = {1,2,3,4,5};
std::vector<int> src2;
Expand Down
18 changes: 9 additions & 9 deletions test/IterRangeTest.cpp → test/CtorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using namespace boolinq;

//////////////////////////////////////////////////////////////////////////

TEST(IterRange, ListInt)
TEST(Ctor, ListInt)
{
std::list<int> lst;
lst.push_back(1);
Expand All @@ -31,7 +31,7 @@ TEST(IterRange, ListInt)
CheckRangeEqArray(from(lst.cbegin(), lst.cend()), ans);
}

TEST(IterRange, DequeInt)
TEST(Ctor, DequeInt)
{
std::deque<int> dck;
dck.push_back(1);
Expand All @@ -47,7 +47,7 @@ TEST(IterRange, DequeInt)
CheckRangeEqArray(from(dck.cbegin(), dck.cend()), ans);
}

TEST(IterRange, VectorInt)
TEST(Ctor, VectorInt)
{
std::vector<int> vec;
vec.push_back(1);
Expand All @@ -63,7 +63,7 @@ TEST(IterRange, VectorInt)
CheckRangeEqArray(from(vec.cbegin(), vec.cend()), ans);
}

TEST(IterRange, SetInt)
TEST(Ctor, SetInt)
{
std::set<int> set = {1,2,3,4,5};
int ans[] = {1,2,3,4,5};
Expand All @@ -73,7 +73,7 @@ TEST(IterRange, SetInt)
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::pair<int, int> ans[] = {{5,1},{4,2},{3,3},{2,4},{1,5}};
Expand All @@ -86,7 +86,7 @@ TEST(IterRange, SetInt)
// .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} };
int ans[] = {1,2,3,4,5};
Expand All @@ -96,7 +96,7 @@ TEST(IterRange, StdArrayInt)
CheckRangeEqArray(from(arr.cbegin(), arr.cend()), ans);
}

TEST(IterRange, ArrayInt)
TEST(Ctor, ArrayInt)
{
int arr[] = {1,2,3,4,5};
int * ptr = static_cast<int *>(arr);
Expand All @@ -110,7 +110,7 @@ TEST(IterRange, ArrayInt)

//////////////////////////////////////////////////////////////////////////

TEST(IterRange, OneElement)
TEST(Ctor, OneElement)
{
int src[] = {5};
int ans[] = {5};
Expand All @@ -120,7 +120,7 @@ TEST(IterRange, OneElement)
CheckRangeEqArray(rng, ans);
}

TEST(IterRange, EmptyVector)
TEST(Ctor, EmptyVector)
{
std::vector<int> src;

Expand Down
10 changes: 5 additions & 5 deletions test/DistinctRangeTest.cpp → test/DistinctTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ans[] = {1,2,3,4,5,6};
Expand All @@ -21,7 +21,7 @@ TEST(DistinctRange, Ints1to6)
CheckRangeEqSet(dst, ans);
}

TEST(DistinctRange, IntMirrorFront)
TEST(Distinct, IntMirrorFront)
{
int src[] = {3,2,1,0,1,2,3};
int ans[] = {0,1,2,3};
Expand All @@ -32,7 +32,7 @@ TEST(DistinctRange, IntMirrorFront)
CheckRangeEqSet(dst, ans);
}

TEST(DistinctRange, ManyEqualsFront)
TEST(Distinct, ManyEqualsFront)
{
int src[] = {1,1,1,1};
int ans[] = {1};
Expand All @@ -43,7 +43,7 @@ TEST(DistinctRange, ManyEqualsFront)
CheckRangeEqSet(dst, ans);
}

TEST(DistinctRange, ManyEqualsWithOneFront)
TEST(Distinct, ManyEqualsWithOneFront)
{
int src[] = {1,1,2,1};
int ans[] = {1,2};
Expand All @@ -54,7 +54,7 @@ TEST(DistinctRange, ManyEqualsWithOneFront)
CheckRangeEqSet(dst, ans);
}

TEST(DistinctRange, OneFieldFront)
TEST(Distinct, OneFieldFront)
{
struct Man
{
Expand Down
4 changes: 2 additions & 2 deletions test/GroupByTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand All @@ -32,7 +32,7 @@ TEST(GroupByRange, Ints)

//////////////////////////////////////////////////////////////////////////

TEST(GroupByRange, CountChildrenByAge)
TEST(GroupBy, CountChildrenByAge)
{
struct Child
{
Expand Down
2 changes: 1 addition & 1 deletion test/LinqTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ TEST(Linq, Creations)
vec.push_back(4);
vec.push_back(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);
//const int * cptr = const_cast<int *>(arr);

Expand Down
Loading

0 comments on commit d36208e

Please sign in to comment.