From 23a0f5318c50cdf3dce19e4de0c98fb5ae1c2618 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sun, 7 Aug 2011 11:39:54 +0200 Subject: JANITORIAL: Remove trailing empty lines. --- test/common/algorithm.h | 1 - test/common/fixedstack.h | 1 - test/common/queue.h | 1 - test/common/stack.h | 1 - test/common/tokenizer.h | 1 - 5 files changed, 5 deletions(-) (limited to 'test/common') diff --git a/test/common/algorithm.h b/test/common/algorithm.h index 4d7e9b2e20..beba495e40 100644 --- a/test/common/algorithm.h +++ b/test/common/algorithm.h @@ -80,4 +80,3 @@ public: TS_ASSERT_EQUALS(checkSort(list.begin(), list.end(), Common::Less()), true); } }; - diff --git a/test/common/fixedstack.h b/test/common/fixedstack.h index 62e536d5fa..9aa00b4680 100644 --- a/test/common/fixedstack.h +++ b/test/common/fixedstack.h @@ -79,4 +79,3 @@ public: TS_ASSERT(!q2.empty()); } }; - diff --git a/test/common/queue.h b/test/common/queue.h index cadb3979d7..c11f7a31ca 100644 --- a/test/common/queue.h +++ b/test/common/queue.h @@ -80,4 +80,3 @@ public: TS_ASSERT(!q2.empty()); } }; - diff --git a/test/common/stack.h b/test/common/stack.h index 66ba5f5e2b..0b1bcee350 100644 --- a/test/common/stack.h +++ b/test/common/stack.h @@ -79,4 +79,3 @@ public: TS_ASSERT(!q2.empty()); } }; - diff --git a/test/common/tokenizer.h b/test/common/tokenizer.h index 9c14875b81..c6a73d77b7 100644 --- a/test/common/tokenizer.h +++ b/test/common/tokenizer.h @@ -55,4 +55,3 @@ public: } }; - -- cgit v1.2.3 From ab80b20a305728ecbe402ab0461c9a10cd7570b5 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sun, 7 Aug 2011 10:19:30 +0200 Subject: COMMON: Replace x + ARRAYSIZE(x) by the simpler ARRAYEND(x). --- test/common/algorithm.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'test/common') diff --git a/test/common/algorithm.h b/test/common/algorithm.h index beba495e40..6eecae3635 100644 --- a/test/common/algorithm.h +++ b/test/common/algorithm.h @@ -38,30 +38,30 @@ public: const int arraySorted[] = { 1, 2, 3, 3, 4, 5 }; const int arrayUnsorted[] = { 5, 3, 1, 2, 4, 3 }; - TS_ASSERT_EQUALS(checkSort(arraySorted, arraySorted + ARRAYSIZE(arraySorted), Common::Less()), true); - TS_ASSERT_EQUALS(checkSort(arraySorted, arraySorted + ARRAYSIZE(arraySorted), Common::Greater()), false); + TS_ASSERT_EQUALS(checkSort(arraySorted, ARRAYEND(arraySorted), Common::Less()), true); + TS_ASSERT_EQUALS(checkSort(arraySorted, ARRAYEND(arraySorted), Common::Greater()), false); - TS_ASSERT_EQUALS(checkSort(arrayUnsorted, arrayUnsorted + ARRAYSIZE(arrayUnsorted), Common::Less()), false); - TS_ASSERT_EQUALS(checkSort(arrayUnsorted, arrayUnsorted + ARRAYSIZE(arrayUnsorted), Common::Greater()), false); + TS_ASSERT_EQUALS(checkSort(arrayUnsorted, ARRAYEND(arrayUnsorted), Common::Less()), false); + TS_ASSERT_EQUALS(checkSort(arrayUnsorted, ARRAYEND(arrayUnsorted), Common::Greater()), false); } void test_pod_sort() { { int array[] = { 63, 11, 31, 72, 1, 48, 32, 69, 38, 31 }; - Common::sort(array, array + ARRAYSIZE(array)); - TS_ASSERT_EQUALS(checkSort(array, array + ARRAYSIZE(array), Common::Less()), true); + Common::sort(array, ARRAYEND(array)); + TS_ASSERT_EQUALS(checkSort(array, ARRAYEND(array), Common::Less()), true); // already sorted - Common::sort(array, array + ARRAYSIZE(array)); - TS_ASSERT_EQUALS(checkSort(array, array + ARRAYSIZE(array), Common::Less()), true); + Common::sort(array, ARRAYEND(array)); + TS_ASSERT_EQUALS(checkSort(array, ARRAYEND(array), Common::Less()), true); } { int array[] = { 90, 80, 70, 60, 50, 40, 30, 20, 10 }; - Common::sort(array, array + ARRAYSIZE(array)); - TS_ASSERT_EQUALS(checkSort(array, array + ARRAYSIZE(array), Common::Less()), true); + Common::sort(array, ARRAYEND(array)); + TS_ASSERT_EQUALS(checkSort(array, ARRAYEND(array), Common::Less()), true); - Common::sort(array, array + ARRAYSIZE(array), Common::Greater()); - TS_ASSERT_EQUALS(checkSort(array, array + ARRAYSIZE(array), Common::Greater()), true); + Common::sort(array, ARRAYEND(array), Common::Greater()); + TS_ASSERT_EQUALS(checkSort(array, ARRAYEND(array), Common::Greater()), true); } } -- cgit v1.2.3