Fixed the range calculation; fixes #424 (#428)

Thanks to @bryceschober for pointing this out and drafting a fix.
This commit is contained in:
Dr. Patrick Urbanke (劉自成)
2025-05-05 11:52:45 +08:00
committed by GitHub
parent c36142d645
commit 41194ad33c
2 changed files with 19 additions and 10 deletions
+2 -2
View File
@@ -7,7 +7,7 @@
namespace test_enum_range_min_max {
enum class InnerColor { none = -128, red = -50, green = 0, blue = 128 };
enum class LineColor { yellow = 200, purple = 300, orange = 400 };
enum class LineColor : uint16_t { yellow = 200, purple = 300, orange = 400 };
} // namespace test_enum_range_min_max
@@ -30,4 +30,4 @@ TEST(generic, test_enum_range_min_max) {
EXPECT_EQ(line_max, 400);
}
} // namespace test_enum_range_min_max
} // namespace test_enum_range_min_max