include(cmake_test/cmake_test)

ct_add_test(NAME assert_string)
function(${assert_string})
    include(cmake_test/asserts/string)

    ct_add_section(NAME test_empty_string)
    function(${test_empty_string})
        set(input "")
        ct_assert_string(input)
    endfunction()

    ct_add_section(NAME test_string)
    function(${test_string})
        set(input "hi")
        ct_assert_string(input)
    endfunction()

    ct_add_section(NAME test_escaped_semicolon)
    function(${test_escaped_semicolon})
        set(input "hi\;world")
        ct_assert_string(input)
    endfunction()

    ct_add_section(NAME test_explicit_list EXPECTFAIL)
    function(${test_explicit_list})
        set(input "hi;world")
        ct_assert_string(input)
    endfunction()

    ct_add_section(NAME test_implicit_list EXPECTFAIL)
    function(${test_implicit_list})
        set(input "hi" "world")
        ct_assert_string(input)
    endfunction()
endfunction()

ct_add_test(NAME assert_not_string)
function(${assert_not_string})
    include(cmake_test/asserts/string)

    ct_add_section(NAME test_empty_string EXPECTFAIL)
    function(${test_empty_string})
        set(input "")
        ct_assert_not_string(input)
    endfunction()

    ct_add_section(NAME test_string EXPECTFAIL)
    function(${test_string})
        set(input "hi")
        ct_assert_not_string(input)
    endfunction()

    ct_add_section(NAME test_escaped_semicolon EXPECTFAIL)
    function(${test_escaped_semicolon})
        set(input "hi\;world")
        ct_assert_not_string(input)
    endfunction()

    ct_add_section(NAME test_explicit_list)
    function(${test_explicit_list})
        set(input "hi;world")
        ct_assert_not_string(input)
    endfunction()

    ct_add_section(NAME test_implicit_list)
    function(${test_implicit_list})
        set(input "hi" "world")
        ct_assert_not_string(input)
    endfunction()
endfunction()
