From 2edc8b60b99f42f15aafb1c57d77dcd20302e4c5 Mon Sep 17 00:00:00 2001 From: Shaoyuan CHEN Date: Wed, 15 Feb 2017 22:40:56 +0800 Subject: [PATCH] capitalize the names --- main.cpp | 31 ++----------------- test/approximate_entropy_test.cpp | 2 +- test/autocorrelation_test.cpp | 2 +- test/binary_derivative_test.cpp | 2 +- test/binary_matrix_rank_test.cpp | 2 +- test/cumulative_test.cpp | 2 +- test/frequency_test_within_a_block.cpp | 2 +- test/linear_complexity_test.cpp | 2 +- test/monobit_frequency_test.cpp | 2 +- test/poker_test.cpp | 2 +- test/runs_distribution_test.cpp | 2 +- test/runs_test.cpp | 2 +- test/serial_test.cpp | 4 +-- ...for_the_longest_run_of_ones_in_a_block.cpp | 2 +- 14 files changed, 17 insertions(+), 42 deletions(-) diff --git a/main.cpp b/main.cpp index 0297332..250e5f7 100644 --- a/main.cpp +++ b/main.cpp @@ -47,10 +47,6 @@ int main(int argc, char* argv[]){ v.push_back(distribution(generator)); } - testSuit::initDefaultTests(); - testSuit::runTest(v); - - return 0; } else { fstream f(argv[1]); @@ -65,30 +61,9 @@ int main(int argc, char* argv[]){ } } - test::monobit_frequency_test(v); - test::frequency_test_within_a_block(v, 100); - test::poker_test(v, 4); - test::poker_test(v, 8); - test::serial_test(v, 2); - test::serial_test2(v); - test::serial_test(v, 5); - test::serial_test2(v); - test::runs_test(v); - test::runs_distribution_test(v); - test::test_for_the_longest_run_of_ones_in_a_block(v, 10000); - test::binary_derivative_test(v, 3); - test::binary_derivative_test(v, 7); - test::autocorrelation_test(v, 1); - test::autocorrelation_test(v, 2); - test::autocorrelation_test(v, 8); - test::autocorrelation_test(v, 16); - test::binary_matrix_rank_test(v, 32, 32); - test::cumulative_test(v); - test::approximate_entropy_test(v, 2); - test::approximate_entropy_test(v, 5); - test::linear_complexity_test(v, 500); - test::Maurers_universal_test(v, 7, 1280); - test::Discrete_Fourier_Transform_test(v); + testSuit::initDefaultTests(); + testSuit::runTest(v); + return 0; } diff --git a/test/approximate_entropy_test.cpp b/test/approximate_entropy_test.cpp index 51cf860..10a5f0b 100644 --- a/test/approximate_entropy_test.cpp +++ b/test/approximate_entropy_test.cpp @@ -106,7 +106,7 @@ namespace test{ } const char* testName(int lang = 0){ - char* names[1] = {"approximate entropy test"}; + char* names[1] = {"Approximate entropy test"}; return names[lang]; } diff --git a/test/autocorrelation_test.cpp b/test/autocorrelation_test.cpp index d00c2f6..97bcf73 100644 --- a/test/autocorrelation_test.cpp +++ b/test/autocorrelation_test.cpp @@ -34,7 +34,7 @@ namespace test{ } const char* testName(int lang = 0){ - char* names[1] = {"autocorrelation test"}; + char* names[1] = {"Autocorrelation test"}; return names[lang]; } diff --git a/test/binary_derivative_test.cpp b/test/binary_derivative_test.cpp index f999e3d..9c95cc6 100644 --- a/test/binary_derivative_test.cpp +++ b/test/binary_derivative_test.cpp @@ -40,7 +40,7 @@ namespace test{ } const char* testName(int lang = 0){ - char* names[1] = {"binary derivative test"}; + char* names[1] = {"Binary derivative test"}; return names[lang]; } diff --git a/test/binary_matrix_rank_test.cpp b/test/binary_matrix_rank_test.cpp index 320ef24..d505dbb 100644 --- a/test/binary_matrix_rank_test.cpp +++ b/test/binary_matrix_rank_test.cpp @@ -61,7 +61,7 @@ namespace test{ } const char* testName(int lang = 0){ - char* names[1] = {"binary matrix rank test"}; + char* names[1] = {"Binary matrix rank test"}; return names[lang]; } diff --git a/test/cumulative_test.cpp b/test/cumulative_test.cpp index 6f74ab9..15b5e3f 100644 --- a/test/cumulative_test.cpp +++ b/test/cumulative_test.cpp @@ -36,7 +36,7 @@ namespace test{ } const char* testName(int lang = 0){ - char* names[1] = {"cumulative test"}; + char* names[1] = {"Cumulative test"}; return names[lang]; } diff --git a/test/frequency_test_within_a_block.cpp b/test/frequency_test_within_a_block.cpp index 6d494c7..61217d9 100644 --- a/test/frequency_test_within_a_block.cpp +++ b/test/frequency_test_within_a_block.cpp @@ -46,7 +46,7 @@ namespace test{ } const char* testName(int lang = 0){ - char* names[1] = {"frequency test within a block"}; + char* names[1] = {"Frequency test within a block"}; return names[lang]; } diff --git a/test/linear_complexity_test.cpp b/test/linear_complexity_test.cpp index 41e15ba..741eac2 100644 --- a/test/linear_complexity_test.cpp +++ b/test/linear_complexity_test.cpp @@ -65,7 +65,7 @@ namespace test{ } const char* testName(int lang = 0){ - char* names[1] = {"linear complexity test"}; + char* names[1] = {"Linear complexity test"}; return names[lang]; } diff --git a/test/monobit_frequency_test.cpp b/test/monobit_frequency_test.cpp index 43df547..f31bd1c 100644 --- a/test/monobit_frequency_test.cpp +++ b/test/monobit_frequency_test.cpp @@ -29,7 +29,7 @@ namespace test{ } const char* testName(int lang = 0){ - char* names[1] = {"monobit frequency test"}; + char* names[1] = {"Monobit frequency test"}; return names[lang]; } diff --git a/test/poker_test.cpp b/test/poker_test.cpp index 5452237..3ca1c4c 100644 --- a/test/poker_test.cpp +++ b/test/poker_test.cpp @@ -53,7 +53,7 @@ namespace test{ } const char* testName(int lang = 0){ - char* names[1] = {"poker test"}; + char* names[1] = {"Poker test"}; return names[lang]; } diff --git a/test/runs_distribution_test.cpp b/test/runs_distribution_test.cpp index 0c157bc..1051f9d 100644 --- a/test/runs_distribution_test.cpp +++ b/test/runs_distribution_test.cpp @@ -59,7 +59,7 @@ namespace test{ } const char* testName(int lang = 0){ - char* names[1] = {"runs distribution test"}; + char* names[1] = {"Runs distribution test"}; return names[lang]; } diff --git a/test/runs_test.cpp b/test/runs_test.cpp index d52b0fe..36bc5da 100644 --- a/test/runs_test.cpp +++ b/test/runs_test.cpp @@ -37,7 +37,7 @@ namespace test{ } const char* testName(int lang = 0){ - char* names[1] = {"runs test"}; + char* names[1] = {"Runs test"}; return names[lang]; } diff --git a/test/serial_test.cpp b/test/serial_test.cpp index 84245d2..7aea2c2 100644 --- a/test/serial_test.cpp +++ b/test/serial_test.cpp @@ -93,7 +93,7 @@ namespace test{ } const char* testName(int lang = 0){ - char* names[1] = {"serial test (1)"}; + char* names[1] = {"Serial test (1)"}; return names[lang]; } @@ -111,7 +111,7 @@ namespace test{ } const char* testName(int lang = 0){ - char* names[1] = {"serial test (2)"}; + char* names[1] = {"Serial test (2)"}; return names[lang]; } diff --git a/test/test_for_the_longest_run_of_ones_in_a_block.cpp b/test/test_for_the_longest_run_of_ones_in_a_block.cpp index 1ccbd98..0a6baee 100644 --- a/test/test_for_the_longest_run_of_ones_in_a_block.cpp +++ b/test/test_for_the_longest_run_of_ones_in_a_block.cpp @@ -59,7 +59,7 @@ namespace test{ } const char* testName(int lang = 0){ - char* names[1] = {"test for the longest run of ones in a block"}; + char* names[1] = {"Test for the longest run of ones in a block"}; return names[lang]; }