diff --git a/examples/statictest.cpp b/examples/statictest.cpp index a288c78e..18efdf8c 100644 --- a/examples/statictest.cpp +++ b/examples/statictest.cpp @@ -34,45 +34,6 @@ //----------------------------------------------------------------------------------------- enum class component : int { scheme, authority, userinfo, user, password, host, port, path, query, fragment }; -/* -namespace TEST -{ - enum class NineEnums : int { One, Two, Three, Four, Five, Six, Seven, Eight, Nine }; - enum NineEnums1 : int { One, Two, Three, Four, Five, Six, Seven, Eight, Nine }; - namespace TEST1 - { - enum class NineEnums : int { One, Two, Three, Four, Five, Six, Seven, Eight, Nine }; - enum NineEnums1 : int { One, Two, Three, Four, Five, Six, Seven, Eight, Nine }; - namespace TEST2::TEST3::TEST4::TEST5 - { - enum class NineEnums : int { One, Two, Three, Four, Five, Six, Seven, Eight, Nine }; - enum NineEnums1 : int { One, Two, Three, Four, Five, Six, Seven, Eight, Nine }; - } - } -} - -namespace gsdsp::dsp::fd -{ - -class AnalysisFrame -{ - public: - enum class PrecomputedFrames - { one }; -}; -} - -namespace gsdsp::utilities -{ - template - [[nodiscard]] - constexpr size_t countOf() - { - return FIX8::conjure_enum::count(); - } -} -*/ - //----------------------------------------------------------------------------------------- using namespace FIX8; @@ -88,12 +49,5 @@ int main(void) for(const auto& a : conjure_enum::unscoped_names) std::cout << a << '\n'; -/* - for(const auto& [a, b] : conjure_enum::entries) - std::cout << conjure_enum::enum_to_int(a) << ' ' << b << '\n'; - std::cout << conjure_enum::count() << '\n'; - - std::cout << gsdsp::utilities::countOf() << '\n'; -*/ return 0; } diff --git a/utests/edgetests.cpp b/utests/edgetests.cpp index ca19241f..7693abfd 100644 --- a/utests/edgetests.cpp +++ b/utests/edgetests.cpp @@ -33,9 +33,6 @@ #include #include -//----------------------------------------------------------------------------------------- -using namespace FIX8; - //----------------------------------------------------------------------------------------- namespace { @@ -59,6 +56,30 @@ namespace TEST } } +namespace test::rsp::gd +{ + +class AFrame +{ + public: + enum class PreFrames + { one }; +}; +} + +namespace test::util +{ + template + [[nodiscard]] + constexpr size_t countOf() + { + return FIX8::conjure_enum::count(); + } +} + +//----------------------------------------------------------------------------------------- +using namespace FIX8; + //----------------------------------------------------------------------------------------- // run as: ctest --output-on-failure //----------------------------------------------------------------------------------------- @@ -228,3 +249,8 @@ TEST_CASE("nested anonymous type") } //----------------------------------------------------------------------------------------- +TEST_CASE("nested structured enum") +{ + REQUIRE(test::util::countOf() == 1); +} +