cmoon::test::assert_is_specialization_of


Defined in module <cmoon.test>


template<class Type1, template<class...> class Type2>
void assert_is_specialization_of(std::string_view message = "", const std::source_location& location = std::source_location::current());


(1)

Throws an assert_exception if cmoon::specialization_of<Type1, Type2> is false.

Parameters

message - Extra information to be added to the error message
location - Information about where in the file this assertion was ran

Return value

(none)

Example



import <string>;

import cmoon.test;

class example_test : public cmoon::test::test_case
{
    public:
        example_test()
            : cmoon::test::test_case{"example test"} {}

        void operator()() override
        {
            cmoon::test::assert_is_specialization_of<std::string, std::basic_string>();
        }
};