include(cmake_test/cmake_test)

ct_add_test(NAME "_test_repeat_string")
function(${_test_repeat_string})
    include(cmake_test/detail_/utilities/repeat_string)

    ct_add_section(NAME "_repeat_empty_string")
    function(${_repeat_empty_string})
        _ct_repeat_string(result "" 4)
        ct_assert_equal(result "")
    endfunction()

    ct_add_section(NAME "_repeat_zero_times")
    function(${_repeat_zero_times})
        _ct_repeat_string(result "x" 0)
        ct_assert_equal(result "")
    endfunction()

    ct_add_section(NAME "_repeat_single_character")
    function(${_repeat_single_character})
        _ct_repeat_string(result "x" 4)
        ct_assert_equal(result "xxxx")
    endfunction()

    ct_add_section(NAME "_repeat_substring")
    function(${_repeat_substring})
        _ct_repeat_string(result "xy" 4)
        ct_assert_equal(result "xyxyxyxy")
    endfunction()
endfunction()
