diff options
author | Maxim Pimenov <m@maps.me> | 2015-07-17 11:48:30 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:56:14 +0300 |
commit | 077731b22a1fd41aad71a5972eb84e0aee6270d9 (patch) | |
tree | 6d245c973b09ed0d28bcd2c515172bf23adeac11 /coding | |
parent | eaa56751946aff0514bfa12101dc87b0bc4441a4 (diff) |
Review fixes.
Diffstat (limited to 'coding')
-rw-r--r-- | coding/coding_tests/arithmetic_codec_test.cpp | 1 | ||||
-rw-r--r-- | coding/coding_tests/base64_for_user_id_test.cpp | 1 | ||||
-rw-r--r-- | coding/coding_tests/compressed_bit_vector_test.cpp | 7 | ||||
-rw-r--r-- | coding/coding_tests/compressed_varnum_vector_test.cpp | 2 | ||||
-rw-r--r-- | coding/coding_tests/file_sort_test.cpp | 2 | ||||
-rw-r--r-- | coding/coding_tests/reader_cache_test.cpp | 1 |
6 files changed, 6 insertions, 8 deletions
diff --git a/coding/coding_tests/arithmetic_codec_test.cpp b/coding/coding_tests/arithmetic_codec_test.cpp index 4ed548ebf8..1539968e82 100644 --- a/coding/coding_tests/arithmetic_codec_test.cpp +++ b/coding/coding_tests/arithmetic_codec_test.cpp @@ -5,7 +5,6 @@ #include "std/random.hpp" - UNIT_TEST(ArithmeticCodec) { mt19937 rng(0); diff --git a/coding/coding_tests/base64_for_user_id_test.cpp b/coding/coding_tests/base64_for_user_id_test.cpp index 527c7f91e6..c9d8d268ea 100644 --- a/coding/coding_tests/base64_for_user_id_test.cpp +++ b/coding/coding_tests/base64_for_user_id_test.cpp @@ -6,7 +6,6 @@ #include "std/random.hpp" - using namespace base64_for_user_ids; UNIT_TEST(Base64_Encode_User_Ids) diff --git a/coding/coding_tests/compressed_bit_vector_test.cpp b/coding/coding_tests/compressed_bit_vector_test.cpp index 70e4892388..7ab0a82a21 100644 --- a/coding/coding_tests/compressed_bit_vector_test.cpp +++ b/coding/coding_tests/compressed_bit_vector_test.cpp @@ -6,7 +6,6 @@ #include "std/random.hpp" - uint32_t const NUMS_COUNT = 12345; UNIT_TEST(CompressedBitVector_Sparse) @@ -119,11 +118,13 @@ UNIT_TEST(BitVectors_SubAnd) mt19937 rng(0); vector<bool> v1(NUMS_COUNT * 2, false); //uint64_t numV1Ones = 0; - for (uint32_t i = 0; i < v1.size(); ++i) v1[i] = (rng() % 2) == 0; + for (uint32_t i = 0; i < v1.size(); ++i) + v1[i] = (rng() % 2) == 0; vector<uint32_t> posOnes1; for (uint32_t i = 0; i < v1.size(); ++i) if (v1[i]) posOnes1.push_back(i); vector<bool> v2(posOnes1.size(), false); - for (uint32_t i = 0; i < v2.size(); ++i) v2[i] = (rng() % 2) == 0; + for (uint32_t i = 0; i < v2.size(); ++i) + v2[i] = (rng() % 2) == 0; vector<uint32_t> posOnes2, subandPos; for (uint32_t i = 0; i < v2.size(); ++i) if (v2[i]) posOnes2.push_back(i); for (uint32_t i = 0, j = 0; i < v1.size(); ++i) diff --git a/coding/coding_tests/compressed_varnum_vector_test.cpp b/coding/coding_tests/compressed_varnum_vector_test.cpp index fdeb353fcb..ca1143f819 100644 --- a/coding/coding_tests/compressed_varnum_vector_test.cpp +++ b/coding/coding_tests/compressed_varnum_vector_test.cpp @@ -13,7 +13,7 @@ struct NumsSource { NumsSource(vector<uint64_t> const & v) : m_v(v) {} uint64_t operator()(uint64_t pos) { ASSERT_LESS(pos, m_v.size(), ()); return m_v[pos]; } - + vector<uint64_t> const & m_v; }; diff --git a/coding/coding_tests/file_sort_test.cpp b/coding/coding_tests/file_sort_test.cpp index 4a9feecac4..51f75f28bf 100644 --- a/coding/coding_tests/file_sort_test.cpp +++ b/coding/coding_tests/file_sort_test.cpp @@ -45,7 +45,7 @@ UNIT_TEST(FileSorter_Random) mt19937 rng(0); vector<uint32_t> data(1000); for (size_t i = 0; i < data.size(); ++i) - data[i] = ((i+1 % 100) ? rng() : data[i - 20]); + data[i] = ((i + 1 % 100) ? rng() : data[i - 20]); TestFileSorter(data, "file_sorter_test_random.tmp", data.size() / 10); } diff --git a/coding/coding_tests/reader_cache_test.cpp b/coding/coding_tests/reader_cache_test.cpp index 66079d7034..5b5f1f2d06 100644 --- a/coding/coding_tests/reader_cache_test.cpp +++ b/coding/coding_tests/reader_cache_test.cpp @@ -6,7 +6,6 @@ #include "std/algorithm.hpp" #include "std/random.hpp" - namespace { template <class ReaderT> class CacheReader |