From fbaa616f5cd95f68419a950b152f2f697df47957 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Fri, 27 Jan 2023 08:25:20 +0800 Subject: [PATCH] fix: namespace in all cases test --- src/klotski/all_cases/all_cases.h | 2 +- src/klotski/all_cases/basic_ranges.h | 2 +- src/klotski/utils/common.h | 5 ++--- test/all_cases.cc | 16 +++++++++------- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/klotski/all_cases/all_cases.h b/src/klotski/all_cases/all_cases.h index 8e0fb0d..4eca3c1 100644 --- a/src/klotski/all_cases/all_cases.h +++ b/src/klotski/all_cases/all_cases.h @@ -6,7 +6,7 @@ #include "basic_ranges.h" namespace klotski { - /// all cases count + /// all cases count -> memory pre-allocated const uint32_t ALL_CASES_SIZE[16] = { 2942906, 2260392, 2942906, 0, 2322050, 1876945, 2322050, 0, diff --git a/src/klotski/all_cases/basic_ranges.h b/src/klotski/all_cases/basic_ranges.h index 6c03aaf..fc097e8 100644 --- a/src/klotski/all_cases/basic_ranges.h +++ b/src/klotski/all_cases/basic_ranges.h @@ -5,7 +5,7 @@ #include namespace klotski { - /// basic ranges count + /// basic ranges count -> memory pre-allocated const uint32_t BASIC_RANGES_SIZE = 7311921; class BasicRanges { diff --git a/src/klotski/utils/common.h b/src/klotski/utils/common.h index b103572..fb4ae39 100644 --- a/src/klotski/utils/common.h +++ b/src/klotski/utils/common.h @@ -9,9 +9,8 @@ /// /// 3. `2x2` block must have and only one, `2x1` `1x2` `1x1` are not required in number. /// -/// NOTE: 2x2 2x1 1x2 1x1 -/// # # # # # # -/// # # # +/// NOTE: 2x2 -> # # | 2x1 -> # | 1x2 -> # # | 1x1 -> # +/// # # | # | | /// /// After statistics, there are a total of 29334498 cases that meet the above requirements. diff --git a/test/all_cases.cc b/test/all_cases.cc index 6fa04d6..980822f 100644 --- a/test/all_cases.cc +++ b/test/all_cases.cc @@ -3,17 +3,19 @@ #include "all_cases.h" #include "gtest/gtest.h" +using namespace klotski; + /// basic ranges constants -const uint32_t BASIC_RANGES_SIZE = 7311921; +//const uint32_t BASIC_RANGES_SIZE = 7311921; const char BASIC_RANGES_MD5[] = "6f385dc171e201089ff96bb010b47212"; /// all cases constants -const uint32_t ALL_CASES_SIZE[16] = { - 2942906, 2260392, 2942906, 0, - 2322050, 1876945, 2322050, 0, - 2322050, 1876945, 2322050, 0, - 2942906, 2260392, 2942906, 0, -}; +//const uint32_t ALL_CASES_SIZE[16] = { +// 2942906, 2260392, 2942906, 0, +// 2322050, 1876945, 2322050, 0, +// 2322050, 1876945, 2322050, 0, +// 2942906, 2260392, 2942906, 0, +//}; const uint32_t ALL_CASES_SIZE_SUM = 29334498; const char ALL_CASES_MD5[] = "3888e9fab8d3cbb50908b12b147cfb23";