<commit_before>cmake_minimum_required (VERSION 2.4)
project (xopt)

add_library (xopt STATIC "${CMAKE_CURRENT_SOURCE_DIR}/xopt.c")

function (_xopt_test name)
	add_executable ("xopt-test-${name}" "${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.c")
	target_link_libraries ("xopt-test-${name}" xopt)
	add_test (
		NAME "xopt-test-${name}--test"
		COMMAND $<TARGET_FILE:xopt-test-${name}> ${ARGN}
		WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test")
endfunction ()

if (BUILD_TESTING)
	enable_testing ()
	_xopt_test (simple "--some-int=10" "--some-double=14.5")
	_xopt_test (macro --some-int=10 --some-double=14.5)
	_xopt_test (required --some-int=10 --some-double=14.5 --some-required=1337)
endif ()<commit_msg>clean up xopt test names<commit_after>cmake_minimum_required (VERSION 2.4)
project (xopt)

add_library (xopt STATIC "${CMAKE_CURRENT_SOURCE_DIR}/xopt.c")

function (_xopt_test name)
	add_executable ("xopt-test-${name}" "${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.c")
	target_link_libraries ("xopt-test-${name}" xopt)
	add_test (
		NAME "xopt-${name}-test"
		COMMAND $<TARGET_FILE:xopt-test-${name}> ${ARGN}
		WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test")
endfunction ()

if (BUILD_TESTING)
	enable_testing ()
	_xopt_test (simple "--some-int=10" "--some-double=14.5")
	_xopt_test (macro --some-int=10 --some-double=14.5)
	_xopt_test (required --some-int=10 --some-double=14.5 --some-required=1337)
endif ()
{'fraction_non_alphanumeric': 0.17642907551164433, 'fraction_numerical': 0.029640084685956247, 'mean_word_length': 5.720379146919432, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2678377', 'n_tokens_mistral': 587, 'n_tokens_neox': 554, 'n_words': 92}