diff --git a/tests/lib/libfunc_dot_c_test.cpp b/tests/lib/libfunc_dot_c_test.cpp new file mode 100644 index 0000000..02e8f89 --- /dev/null +++ b/tests/lib/libfunc_dot_c_test.cpp @@ -0,0 +1,26 @@ +/* + * This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + */ + +#include "libfunc_dot_c_test.h" + +#include "gtest/gtest.h" +namespace UTBot { + + +#pragma region regression +TEST(regression, libfunc_test_1) +{ + int actual = libfunc(1); + EXPECT_EQ(1, actual); +} + +#pragma endregion +#pragma region error +TEST(error, libfunc_test_2) +{ + libfunc(0); +} + +#pragma endregion +} diff --git a/tests/lib/libfunc_dot_c_test.h b/tests/lib/libfunc_dot_c_test.h new file mode 100644 index 0000000..7dba8b5 --- /dev/null +++ b/tests/lib/libfunc_dot_c_test.h @@ -0,0 +1,144 @@ +/* + * This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + */ + +namespace UTBot { +#define typeid typeid_ +#define throw throw_ +#define thread_local thread_local_ +#define template template_ +#define static_cast static_cast_ +#define requires requires_ +#define public public_ +#define protected protected_ +#define reflexpr reflexpr_ +#define operator operator_ +#define noexcept noexcept_ +#define new new_ +#define namespace namespace_ +#define mutable mutable_ +#define try try_ +#define private private_ +#define friend friend_ +#define virtual virtual_ +#define nullptr nullptr_ +#define export export_ +#define this this_ +#define explicit explicit_ +#define typename typename_ +#define delete delete_ +#define decltype decltype_ +#define co_yield co_yield_ +#define co_return co_return_ +#define co_await co_await_ +#define const_cast const_cast_ +#define constinit constinit_ +#define consteval consteval_ +#define class class_ +#define synchronized synchronized_ +#define char32_t char32_t_ +#define constexpr constexpr_ +#define char8_t char8_t_ +#define catch catch_ +#define using using_ +#define char16_t char16_t_ +#define atomic_noexcept atomic_noexcept_ +#define concept concept_ +#define atomic_commit atomic_commit_ +#define static_assert static_assert_ +#define atomic_cancel atomic_cancel_ +#define dynamic_cast dynamic_cast_ +#define asm asm_ +#define reinterpret_cast reinterpret_cast_ +#define alignof alignof_ +#define alignas alignas_ +#define _Alignas(x) +#define _Atomic(x) x +#define _Bool bool +#define _Noreturn +#define _Thread_local thread_local + +struct __va_list_tag; + +extern "C" int libfunc_lib_libfunc_c(int a); +static int libfunc(int a) { +return libfunc_lib_libfunc_c(a); +} + +#ifdef wchar_t +#undef wchar_t +#endif + +} +#undef typeid +#undef throw +#undef thread_local +#undef template +#undef static_cast +#undef requires +#undef public +#undef protected +#undef reflexpr +#undef operator +#undef noexcept +#undef new +#undef namespace +#undef mutable +#undef try +#undef private +#undef friend +#undef virtual +#undef nullptr +#undef export +#undef this +#undef explicit +#undef typename +#undef delete +#undef decltype +#undef co_yield +#undef co_return +#undef co_await +#undef const_cast +#undef constinit +#undef consteval +#undef class +#undef synchronized +#undef char32_t +#undef constexpr +#undef char8_t +#undef catch +#undef using +#undef char16_t +#undef atomic_noexcept +#undef concept +#undef atomic_commit +#undef static_assert +#undef atomic_cancel +#undef dynamic_cast +#undef asm +#undef reinterpret_cast +#undef alignof +#undef alignas +#include + +#include + + +void utbot_redirect_stdin(const char* buf, int &res) { + int fds[2]; + if (pipe(fds) == -1) { + res = -1; + return; + } + close(STDIN_FILENO); + dup2(fds[0], STDIN_FILENO); + write(fds[1], buf, 64); + close(fds[1]); +} + +template +T from_bytes(const char (&bytes)[N]) { + T result; + std::memcpy(&result, bytes, sizeof(result)); + return result; +} diff --git a/tests/makefiles/lib/__libfunc_obj.mk b/tests/makefiles/lib/__libfunc_obj.mk new file mode 100644 index 0000000..3241544 --- /dev/null +++ b/tests/makefiles/lib/__libfunc_obj.mk @@ -0,0 +1,45 @@ +# This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + +$(shell mkdir -p $(BUILD_DIR) >/dev/null) +$(shell mkdir -p $(BUILD_DIR)/dependencies >/dev/null) +.FORCE : + +# { gtest +$(BUILD_DIR)/googletest/gtest-all.cc.o : $(GTEST)/googletest/src/gtest-all.cc + mkdir -p $(BUILD_DIR)/googletest && $(CLANGXX) -I$(GTEST)/googletest/include -I$(GTEST)/googletest -o $(BUILD_DIR)/googletest/gtest-all.cc.o -c -std=c++11 -fPIC $(GTEST)/googletest/src/gtest-all.cc +export GTEST_ALL = $(BUILD_DIR)/googletest/gtest-all.cc.o +$(BUILD_DIR)/googletest/gtest_main.cc.o : $(GTEST)/googletest/src/gtest_main.cc + mkdir -p $(BUILD_DIR)/googletest && $(CLANGXX) -I$(GTEST)/googletest/include -I$(GTEST)/googletest -o $(BUILD_DIR)/googletest/gtest_main.cc.o -c -std=c++11 -fPIC $(GTEST)/googletest/src/gtest_main.cc +export GTEST_MAIN = $(BUILD_DIR)/googletest/gtest_main.cc.o +# } gtest +$(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o : $(PROJECT_DIR)/tests/wrapper/src/main_wrapper.c $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.d + mkdir -p $(BUILD_DIR)/dependencies/tests/wrapper/src + mkdir -p $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src && C_INCLUDE_PATH=$UTBOT_LAUNCH_INCLUDE_PATH $(CLANG) -iquote$(PROJECT_DIR)/src -MT $@ -MMD -MP -MF $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.Td -fsanitize=alignment,builtin,bounds,enum,float-cast-overflow,float-divide-by-zero,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,integer-divide-by-zero,nonnull-attribute,null,nullability-arg,nullability-assign,nullability-return,pointer-overflow,return,returns-nonnull-attribute,shift,unreachable,vla-bound -fsanitize=address -fno-sanitize-recover=all -fprofile-instr-generate -fcoverage-mapping -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIC -O0 -c -std=gnu11 -o $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o $(PROJECT_DIR)/tests/wrapper/src/main_wrapper.c + mv -f $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.Td $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.d +$(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o : $(PROJECT_DIR)/tests/wrapper/lib/libfunc_wrapper.c $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.d + mkdir -p $(BUILD_DIR)/dependencies/tests/wrapper/lib + mkdir -p $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir && C_INCLUDE_PATH=$UTBOT_LAUNCH_INCLUDE_PATH $(CLANG) -iquote$(PROJECT_DIR)/lib -MT $@ -MMD -MP -MF $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.Td -fsanitize=alignment,builtin,bounds,enum,float-cast-overflow,float-divide-by-zero,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,integer-divide-by-zero,nonnull-attribute,null,nullability-arg,nullability-assign,nullability-return,pointer-overflow,return,returns-nonnull-attribute,shift,unreachable,vla-bound -fsanitize=address -fno-sanitize-recover=all -fprofile-instr-generate -fcoverage-mapping -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIC -O0 -c -std=gnu11 -o $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o $(PROJECT_DIR)/tests/wrapper/lib/libfunc_wrapper.c + mv -f $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.Td $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.d +$(BUILD_DIR)/recompiled/lib/liblib.a : $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o + rm -f $(BUILD_DIR)/recompiled/lib/liblib.a + mkdir -p $(BUILD_DIR)/recompiled/lib && $(AR) qc -o $(BUILD_DIR)/recompiled/lib/liblib.a $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o +$(BUILD_DIR)/recompiled/c-example-mini.o : $(BUILD_DIR)/recompiled/lib/liblib.a $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o + rm -f $(BUILD_DIR)/recompiled/c-example-mini.o + mkdir -p $(BUILD_DIR)/recompiled && $(LD) -r $(LDFLAGS) -fuse-ld=gold -o $(BUILD_DIR)/recompiled/c-example-mini.o $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o $(BUILD_DIR)/recompiled/lib/liblib.a && objcopy --redefine-sym main=main__ $(BUILD_DIR)/recompiled/c-example-mini.o +$(BUILD_DIR)/test_objects/lib/libfunc_dot_c_test.cpp.o : $(PROJECT_DIR)/tests/lib/libfunc_dot_c_test.cpp + mkdir -p $(BUILD_DIR)/test_objects/lib && $(CLANGXX) -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIC -I$(GTEST)/googletest/include -O0 -c -o $(BUILD_DIR)/test_objects/lib/libfunc_dot_c_test.cpp.o $(PROJECT_DIR)/tests/lib/libfunc_dot_c_test.cpp +$(BUILD_DIR)/recompiled/lib/libfunc : $(GTEST_MAIN) $(GTEST_ALL) $(BUILD_DIR)/test_objects/lib/libfunc_dot_c_test.cpp.o $(BUILD_DIR)/recompiled/c-example-mini.o $(BUILD_DIR)/recompiled/lib/liblib.a + mkdir -p $(BUILD_DIR)/recompiled/lib && $(CLANGXX) $(LDFLAGS) -L$(BUILD_DIR)/recompiled $(GTEST_MAIN) $(GTEST_ALL) $(BUILD_DIR)/test_objects/lib/libfunc_dot_c_test.cpp.o $(BUILD_DIR)/recompiled/c-example-mini.o $(BUILD_DIR)/recompiled/lib/liblib.a -lpthread -fprofile-instr-generate -fsanitize=alignment,builtin,bounds,enum,float-cast-overflow,float-divide-by-zero,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,integer-divide-by-zero,nonnull-attribute,null,nullability-arg,nullability-assign,nullability-return,pointer-overflow,return,returns-nonnull-attribute,shift,unreachable,vla-bound -fsanitize=address -O0 -fuse-ld=gold -o $(BUILD_DIR)/recompiled/lib/libfunc +bin : .FORCE + echo $(BUILD_DIR)/recompiled/lib/libfunc +build : $(BUILD_DIR)/recompiled/lib/libfunc + +run : build + cd "$(BUILD_DIR)" && PATH=$$PATH:$(pwd) UBSAN_OPTIONS=print_stacktrace=1,report_error_type=1 ASAN_OPTIONS=debug=1,detect_odr_violation=1,detect_stack_use_after_return=1,detect_leaks=0 $(BUILD_DIR)/recompiled/lib/libfunc $(GTEST_FLAGS) +clean : + rm -rf $(BUILD_DIR) $(BUILD_DIR)/dependencies $(BUILD_DIR)/googletest/gtest-all.cc.o $(BUILD_DIR)/googletest/gtest_main.cc.o $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o $(BUILD_DIR)/recompiled/lib/liblib.a $(BUILD_DIR)/recompiled/c-example-mini.o $(BUILD_DIR)/test_objects/lib/libfunc_dot_c_test.cpp.o $(BUILD_DIR)/recompiled/lib/libfunc +.PRECIOUS: $(BUILD_DIR)/dependencies/%.d +$(BUILD_DIR)/dependencies/%.d: ; + +-include $(BUILD_DIR)/dependencies/*.Td $(BUILD_DIR)/dependencies/*.d + diff --git a/tests/makefiles/lib/__libfunc_shared.mk b/tests/makefiles/lib/__libfunc_shared.mk new file mode 100644 index 0000000..1bc9389 --- /dev/null +++ b/tests/makefiles/lib/__libfunc_shared.mk @@ -0,0 +1,45 @@ +# This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + +$(shell mkdir -p $(BUILD_DIR) >/dev/null) +$(shell mkdir -p $(BUILD_DIR)/dependencies >/dev/null) +.FORCE : + +# { gtest +$(BUILD_DIR)/googletest/gtest-all.cc.o : $(GTEST)/googletest/src/gtest-all.cc + mkdir -p $(BUILD_DIR)/googletest && $(CLANGXX) -I$(GTEST)/googletest/include -I$(GTEST)/googletest -o $(BUILD_DIR)/googletest/gtest-all.cc.o -c -std=c++11 -fPIC $(GTEST)/googletest/src/gtest-all.cc +export GTEST_ALL = $(BUILD_DIR)/googletest/gtest-all.cc.o +$(BUILD_DIR)/googletest/gtest_main.cc.o : $(GTEST)/googletest/src/gtest_main.cc + mkdir -p $(BUILD_DIR)/googletest && $(CLANGXX) -I$(GTEST)/googletest/include -I$(GTEST)/googletest -o $(BUILD_DIR)/googletest/gtest_main.cc.o -c -std=c++11 -fPIC $(GTEST)/googletest/src/gtest_main.cc +export GTEST_MAIN = $(BUILD_DIR)/googletest/gtest_main.cc.o +# } gtest +$(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o : $(PROJECT_DIR)/tests/wrapper/src/main_wrapper.c $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.d + mkdir -p $(BUILD_DIR)/dependencies/tests/wrapper/src + mkdir -p $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src && C_INCLUDE_PATH=$UTBOT_LAUNCH_INCLUDE_PATH $(CLANG) -iquote$(PROJECT_DIR)/src -MT $@ -MMD -MP -MF $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.Td -fsanitize=alignment,builtin,bounds,enum,float-cast-overflow,float-divide-by-zero,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,integer-divide-by-zero,nonnull-attribute,null,nullability-arg,nullability-assign,nullability-return,pointer-overflow,return,returns-nonnull-attribute,shift,unreachable,vla-bound -fsanitize=address -fno-sanitize-recover=all -fprofile-instr-generate -fcoverage-mapping -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIC -O0 -c -std=gnu11 -o $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o $(PROJECT_DIR)/tests/wrapper/src/main_wrapper.c + mv -f $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.Td $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.d +$(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o : $(PROJECT_DIR)/tests/wrapper/lib/libfunc_wrapper.c $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.d + mkdir -p $(BUILD_DIR)/dependencies/tests/wrapper/lib + mkdir -p $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir && C_INCLUDE_PATH=$UTBOT_LAUNCH_INCLUDE_PATH $(CLANG) -iquote$(PROJECT_DIR)/lib -MT $@ -MMD -MP -MF $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.Td -fsanitize=alignment,builtin,bounds,enum,float-cast-overflow,float-divide-by-zero,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,integer-divide-by-zero,nonnull-attribute,null,nullability-arg,nullability-assign,nullability-return,pointer-overflow,return,returns-nonnull-attribute,shift,unreachable,vla-bound -fsanitize=address -fno-sanitize-recover=all -fprofile-instr-generate -fcoverage-mapping -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIC -O0 -c -std=gnu11 -o $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o $(PROJECT_DIR)/tests/wrapper/lib/libfunc_wrapper.c + mv -f $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.Td $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.d +$(BUILD_DIR)/recompiled/lib/liblib.a : $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o + rm -f $(BUILD_DIR)/recompiled/lib/liblib.a + mkdir -p $(BUILD_DIR)/recompiled/lib && $(AR) qc -o $(BUILD_DIR)/recompiled/lib/liblib.a $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o +$(BUILD_DIR)/recompiled/libc-example-mini.so : $(BUILD_DIR)/recompiled/lib/liblib.a $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o + rm -f $(BUILD_DIR)/recompiled/libc-example-mini.so + mkdir -p $(BUILD_DIR)/recompiled && $(CLANG) -shared $(LDFLAGS) -O0 -Wl,--allow-multiple-definition -fprofile-instr-generate -fsanitize=alignment,builtin,bounds,enum,float-cast-overflow,float-divide-by-zero,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,integer-divide-by-zero,nonnull-attribute,null,nullability-arg,nullability-assign,nullability-return,pointer-overflow,return,returns-nonnull-attribute,shift,unreachable,vla-bound -fsanitize=address -Wl,--whole-archive -fuse-ld=gold -o $(BUILD_DIR)/recompiled/libc-example-mini.so $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o $(BUILD_DIR)/recompiled/lib/liblib.a -Wl,--no-whole-archive +$(BUILD_DIR)/test_objects/lib/libfunc_dot_c_test.cpp.o : $(PROJECT_DIR)/tests/lib/libfunc_dot_c_test.cpp + mkdir -p $(BUILD_DIR)/test_objects/lib && $(CLANGXX) -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIC -I$(GTEST)/googletest/include -O0 -c -o $(BUILD_DIR)/test_objects/lib/libfunc_dot_c_test.cpp.o $(PROJECT_DIR)/tests/lib/libfunc_dot_c_test.cpp +$(BUILD_DIR)/recompiled/lib/libfunc : $(GTEST_MAIN) $(GTEST_ALL) $(BUILD_DIR)/test_objects/lib/libfunc_dot_c_test.cpp.o $(BUILD_DIR)/recompiled/libc-example-mini.so $(BUILD_DIR)/recompiled/lib/liblib.a + mkdir -p $(BUILD_DIR)/recompiled/lib && $(CLANGXX) $(LDFLAGS) -L$(BUILD_DIR)/recompiled $(GTEST_MAIN) $(GTEST_ALL) $(BUILD_DIR)/test_objects/lib/libfunc_dot_c_test.cpp.o $(BUILD_DIR)/recompiled/libc-example-mini.so $(BUILD_DIR)/recompiled/lib/liblib.a -lpthread -fprofile-instr-generate -fsanitize=alignment,builtin,bounds,enum,float-cast-overflow,float-divide-by-zero,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,integer-divide-by-zero,nonnull-attribute,null,nullability-arg,nullability-assign,nullability-return,pointer-overflow,return,returns-nonnull-attribute,shift,unreachable,vla-bound -fsanitize=address -O0 -fuse-ld=gold -o $(BUILD_DIR)/recompiled/lib/libfunc +bin : .FORCE + echo $(BUILD_DIR)/recompiled/libc-example-mini.so +build : $(BUILD_DIR)/recompiled/lib/libfunc + +run : build + cd "$(BUILD_DIR)" && PATH=$$PATH:$(pwd) UBSAN_OPTIONS=print_stacktrace=1,report_error_type=1 ASAN_OPTIONS=debug=1,detect_odr_violation=1,detect_stack_use_after_return=1,detect_leaks=0 $(BUILD_DIR)/recompiled/lib/libfunc $(GTEST_FLAGS) +clean : + rm -rf $(BUILD_DIR) $(BUILD_DIR)/dependencies $(BUILD_DIR)/googletest/gtest-all.cc.o $(BUILD_DIR)/googletest/gtest_main.cc.o $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o $(BUILD_DIR)/recompiled/lib/liblib.a $(BUILD_DIR)/recompiled/libc-example-mini.so $(BUILD_DIR)/test_objects/lib/libfunc_dot_c_test.cpp.o $(BUILD_DIR)/recompiled/lib/libfunc +.PRECIOUS: $(BUILD_DIR)/dependencies/%.d +$(BUILD_DIR)/dependencies/%.d: ; + +-include $(BUILD_DIR)/dependencies/*.Td $(BUILD_DIR)/dependencies/*.d + diff --git a/tests/makefiles/lib/libfunc.mk b/tests/makefiles/lib/libfunc.mk new file mode 100644 index 0000000..a270895 --- /dev/null +++ b/tests/makefiles/lib/libfunc.mk @@ -0,0 +1,49 @@ +# This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + +# This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + +export PROJECT_DIR_RELATIVE_TO_MAKEFILE = ../../.. +export MAKEFILE_DIR = $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) +export PROJECT_DIR = $(MAKEFILE_DIR)/$(PROJECT_DIR_RELATIVE_TO_MAKEFILE) +export BUILD_RELATIVE = build/utbot_files/utbot_build +export BUILD_DIR = $(PROJECT_DIR)/$(BUILD_RELATIVE) +# This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + +ifndef UTBOT_ALL + export UTBOT_ALL = $(PROJECT_DIR)/utbot-release-2022.10.4/utbot_distr +endif +export UTBOT_INSTALL = $(UTBOT_ALL)/install +export ACCESS_PRIVATE_LIB = $(UTBOT_ALL)/access_private/include +export UTBOT_DEBS_INSTALL_DIR = $(UTBOT_ALL)/debs-install +export ASAN_LIB = $(UTBOT_DEBS_INSTALL_DIR)/usr/lib/x86_64-linux-gnu/libasan.so.5.0.0 +ifneq ("$(wildcard $(UTBOT_INSTALL)/bin/clang-10)\", "") + export CLANG = $(UTBOT_INSTALL)/bin/clang-10 +endif +ifneq ("$(wildcard $(UTBOT_INSTALL)/bin/clang++)\", "") + export CLANGXX = $(UTBOT_INSTALL)/bin/clang++ +endif +export GCC = gcc +export GXX = g++ +ifndef AR + export AR = $(UTBOT_DEBS_INSTALL_DIR)/usr/bin/x86_64-linux-gnu-ar +endif +ifndef LD_GOLD + export LD_GOLD = $(UTBOT_DEBS_INSTALL_DIR)/usr/bin/x86_64-linux-gnu-ld.gold +endif +ifndef LD + export LD = $(UTBOT_DEBS_INSTALL_DIR)/usr/bin/x86_64-linux-gnu-ld.bfd +endif +ifneq ("$(wildcard $(UTBOT_ALL)/gtest)\", "") + export GTEST = $(UTBOT_ALL)/gtest +endif +.FORCE : + +bin : .FORCE + $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/lib/__libfunc_shared.mk bin +build : .FORCE + $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/lib/__libfunc_shared.mk build || $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/lib/__libfunc_obj.mk build +run : .FORCE + $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/lib/__libfunc_shared.mk build && { $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/lib/__libfunc_shared.mk run; exit $$?; } || { $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/lib/__libfunc_obj.mk build && { $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/lib/__libfunc_obj.mk run; exit $$?; } } +clean : .FORCE + $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/lib/__libfunc_shared.mk clean + $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/lib/__libfunc_obj.mk clean diff --git a/tests/makefiles/src/__main_obj.mk b/tests/makefiles/src/__main_obj.mk new file mode 100644 index 0000000..e3c11f8 --- /dev/null +++ b/tests/makefiles/src/__main_obj.mk @@ -0,0 +1,45 @@ +# This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + +$(shell mkdir -p $(BUILD_DIR) >/dev/null) +$(shell mkdir -p $(BUILD_DIR)/dependencies >/dev/null) +.FORCE : + +# { gtest +$(BUILD_DIR)/googletest/gtest-all.cc.o : $(GTEST)/googletest/src/gtest-all.cc + mkdir -p $(BUILD_DIR)/googletest && $(CLANGXX) -I$(GTEST)/googletest/include -I$(GTEST)/googletest -o $(BUILD_DIR)/googletest/gtest-all.cc.o -c -std=c++11 -fPIC $(GTEST)/googletest/src/gtest-all.cc +export GTEST_ALL = $(BUILD_DIR)/googletest/gtest-all.cc.o +$(BUILD_DIR)/googletest/gtest_main.cc.o : $(GTEST)/googletest/src/gtest_main.cc + mkdir -p $(BUILD_DIR)/googletest && $(CLANGXX) -I$(GTEST)/googletest/include -I$(GTEST)/googletest -o $(BUILD_DIR)/googletest/gtest_main.cc.o -c -std=c++11 -fPIC $(GTEST)/googletest/src/gtest_main.cc +export GTEST_MAIN = $(BUILD_DIR)/googletest/gtest_main.cc.o +# } gtest +$(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o : $(PROJECT_DIR)/tests/wrapper/src/main_wrapper.c $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.d + mkdir -p $(BUILD_DIR)/dependencies/tests/wrapper/src + mkdir -p $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src && C_INCLUDE_PATH=$UTBOT_LAUNCH_INCLUDE_PATH $(CLANG) -iquote$(PROJECT_DIR)/src -MT $@ -MMD -MP -MF $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.Td -fsanitize=alignment,builtin,bounds,enum,float-cast-overflow,float-divide-by-zero,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,integer-divide-by-zero,nonnull-attribute,null,nullability-arg,nullability-assign,nullability-return,pointer-overflow,return,returns-nonnull-attribute,shift,unreachable,vla-bound -fsanitize=address -fno-sanitize-recover=all -fprofile-instr-generate -fcoverage-mapping -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIC -O0 -c -std=gnu11 -o $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o $(PROJECT_DIR)/tests/wrapper/src/main_wrapper.c + mv -f $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.Td $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.d +$(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o : $(PROJECT_DIR)/tests/wrapper/lib/libfunc_wrapper.c $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.d + mkdir -p $(BUILD_DIR)/dependencies/tests/wrapper/lib + mkdir -p $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir && C_INCLUDE_PATH=$UTBOT_LAUNCH_INCLUDE_PATH $(CLANG) -iquote$(PROJECT_DIR)/lib -MT $@ -MMD -MP -MF $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.Td -fsanitize=alignment,builtin,bounds,enum,float-cast-overflow,float-divide-by-zero,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,integer-divide-by-zero,nonnull-attribute,null,nullability-arg,nullability-assign,nullability-return,pointer-overflow,return,returns-nonnull-attribute,shift,unreachable,vla-bound -fsanitize=address -fno-sanitize-recover=all -fprofile-instr-generate -fcoverage-mapping -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIC -O0 -c -std=gnu11 -o $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o $(PROJECT_DIR)/tests/wrapper/lib/libfunc_wrapper.c + mv -f $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.Td $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.d +$(BUILD_DIR)/recompiled/lib/liblib.a : $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o + rm -f $(BUILD_DIR)/recompiled/lib/liblib.a + mkdir -p $(BUILD_DIR)/recompiled/lib && $(AR) qc -o $(BUILD_DIR)/recompiled/lib/liblib.a $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o +$(BUILD_DIR)/recompiled/c-example-mini.o : $(BUILD_DIR)/recompiled/lib/liblib.a $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o + rm -f $(BUILD_DIR)/recompiled/c-example-mini.o + mkdir -p $(BUILD_DIR)/recompiled && $(LD) -r $(LDFLAGS) -fuse-ld=gold -o $(BUILD_DIR)/recompiled/c-example-mini.o $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o $(BUILD_DIR)/recompiled/lib/liblib.a && objcopy --redefine-sym main=main__ $(BUILD_DIR)/recompiled/c-example-mini.o +$(BUILD_DIR)/test_objects/src/main_dot_c_test.cpp.o : $(PROJECT_DIR)/tests/src/main_dot_c_test.cpp + mkdir -p $(BUILD_DIR)/test_objects/src && $(CLANGXX) -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIC -I$(GTEST)/googletest/include -O0 -c -o $(BUILD_DIR)/test_objects/src/main_dot_c_test.cpp.o $(PROJECT_DIR)/tests/src/main_dot_c_test.cpp +$(BUILD_DIR)/recompiled/src/main : $(GTEST_MAIN) $(GTEST_ALL) $(BUILD_DIR)/test_objects/src/main_dot_c_test.cpp.o $(BUILD_DIR)/recompiled/c-example-mini.o $(BUILD_DIR)/recompiled/lib/liblib.a + mkdir -p $(BUILD_DIR)/recompiled/src && $(CLANGXX) $(LDFLAGS) -L$(BUILD_DIR)/recompiled $(GTEST_MAIN) $(GTEST_ALL) $(BUILD_DIR)/test_objects/src/main_dot_c_test.cpp.o $(BUILD_DIR)/recompiled/c-example-mini.o $(BUILD_DIR)/recompiled/lib/liblib.a -lpthread -fprofile-instr-generate -fsanitize=alignment,builtin,bounds,enum,float-cast-overflow,float-divide-by-zero,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,integer-divide-by-zero,nonnull-attribute,null,nullability-arg,nullability-assign,nullability-return,pointer-overflow,return,returns-nonnull-attribute,shift,unreachable,vla-bound -fsanitize=address -O0 -fuse-ld=gold -o $(BUILD_DIR)/recompiled/src/main +bin : .FORCE + echo $(BUILD_DIR)/recompiled/src/main +build : $(BUILD_DIR)/recompiled/src/main + +run : build + cd "$(BUILD_DIR)" && PATH=$$PATH:$(pwd) UBSAN_OPTIONS=print_stacktrace=1,report_error_type=1 ASAN_OPTIONS=debug=1,detect_odr_violation=1,detect_stack_use_after_return=1,detect_leaks=0 $(BUILD_DIR)/recompiled/src/main $(GTEST_FLAGS) +clean : + rm -rf $(BUILD_DIR) $(BUILD_DIR)/dependencies $(BUILD_DIR)/googletest/gtest-all.cc.o $(BUILD_DIR)/googletest/gtest_main.cc.o $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o $(BUILD_DIR)/recompiled/lib/liblib.a $(BUILD_DIR)/recompiled/c-example-mini.o $(BUILD_DIR)/test_objects/src/main_dot_c_test.cpp.o $(BUILD_DIR)/recompiled/src/main +.PRECIOUS: $(BUILD_DIR)/dependencies/%.d +$(BUILD_DIR)/dependencies/%.d: ; + +-include $(BUILD_DIR)/dependencies/*.Td $(BUILD_DIR)/dependencies/*.d + diff --git a/tests/makefiles/src/__main_shared.mk b/tests/makefiles/src/__main_shared.mk new file mode 100644 index 0000000..624c135 --- /dev/null +++ b/tests/makefiles/src/__main_shared.mk @@ -0,0 +1,45 @@ +# This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + +$(shell mkdir -p $(BUILD_DIR) >/dev/null) +$(shell mkdir -p $(BUILD_DIR)/dependencies >/dev/null) +.FORCE : + +# { gtest +$(BUILD_DIR)/googletest/gtest-all.cc.o : $(GTEST)/googletest/src/gtest-all.cc + mkdir -p $(BUILD_DIR)/googletest && $(CLANGXX) -I$(GTEST)/googletest/include -I$(GTEST)/googletest -o $(BUILD_DIR)/googletest/gtest-all.cc.o -c -std=c++11 -fPIC $(GTEST)/googletest/src/gtest-all.cc +export GTEST_ALL = $(BUILD_DIR)/googletest/gtest-all.cc.o +$(BUILD_DIR)/googletest/gtest_main.cc.o : $(GTEST)/googletest/src/gtest_main.cc + mkdir -p $(BUILD_DIR)/googletest && $(CLANGXX) -I$(GTEST)/googletest/include -I$(GTEST)/googletest -o $(BUILD_DIR)/googletest/gtest_main.cc.o -c -std=c++11 -fPIC $(GTEST)/googletest/src/gtest_main.cc +export GTEST_MAIN = $(BUILD_DIR)/googletest/gtest_main.cc.o +# } gtest +$(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o : $(PROJECT_DIR)/tests/wrapper/src/main_wrapper.c $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.d + mkdir -p $(BUILD_DIR)/dependencies/tests/wrapper/src + mkdir -p $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src && C_INCLUDE_PATH=$UTBOT_LAUNCH_INCLUDE_PATH $(CLANG) -iquote$(PROJECT_DIR)/src -MT $@ -MMD -MP -MF $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.Td -fsanitize=alignment,builtin,bounds,enum,float-cast-overflow,float-divide-by-zero,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,integer-divide-by-zero,nonnull-attribute,null,nullability-arg,nullability-assign,nullability-return,pointer-overflow,return,returns-nonnull-attribute,shift,unreachable,vla-bound -fsanitize=address -fno-sanitize-recover=all -fprofile-instr-generate -fcoverage-mapping -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIC -O0 -c -std=gnu11 -o $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o $(PROJECT_DIR)/tests/wrapper/src/main_wrapper.c + mv -f $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.Td $(BUILD_DIR)/dependencies/tests/wrapper/src/main_wrapper.c.d +$(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o : $(PROJECT_DIR)/tests/wrapper/lib/libfunc_wrapper.c $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.d + mkdir -p $(BUILD_DIR)/dependencies/tests/wrapper/lib + mkdir -p $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir && C_INCLUDE_PATH=$UTBOT_LAUNCH_INCLUDE_PATH $(CLANG) -iquote$(PROJECT_DIR)/lib -MT $@ -MMD -MP -MF $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.Td -fsanitize=alignment,builtin,bounds,enum,float-cast-overflow,float-divide-by-zero,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,integer-divide-by-zero,nonnull-attribute,null,nullability-arg,nullability-assign,nullability-return,pointer-overflow,return,returns-nonnull-attribute,shift,unreachable,vla-bound -fsanitize=address -fno-sanitize-recover=all -fprofile-instr-generate -fcoverage-mapping -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIC -O0 -c -std=gnu11 -o $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o $(PROJECT_DIR)/tests/wrapper/lib/libfunc_wrapper.c + mv -f $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.Td $(BUILD_DIR)/dependencies/tests/wrapper/lib/libfunc_wrapper.c.d +$(BUILD_DIR)/recompiled/lib/liblib.a : $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o + rm -f $(BUILD_DIR)/recompiled/lib/liblib.a + mkdir -p $(BUILD_DIR)/recompiled/lib && $(AR) qc -o $(BUILD_DIR)/recompiled/lib/liblib.a $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o +$(BUILD_DIR)/recompiled/libc-example-mini.so : $(BUILD_DIR)/recompiled/lib/liblib.a $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o + rm -f $(BUILD_DIR)/recompiled/libc-example-mini.so + mkdir -p $(BUILD_DIR)/recompiled && $(CLANG) -shared $(LDFLAGS) -O0 -Wl,--allow-multiple-definition -fprofile-instr-generate -fsanitize=alignment,builtin,bounds,enum,float-cast-overflow,float-divide-by-zero,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,integer-divide-by-zero,nonnull-attribute,null,nullability-arg,nullability-assign,nullability-return,pointer-overflow,return,returns-nonnull-attribute,shift,unreachable,vla-bound -fsanitize=address -Wl,--whole-archive -fuse-ld=gold -o $(BUILD_DIR)/recompiled/libc-example-mini.so $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o $(BUILD_DIR)/recompiled/lib/liblib.a -Wl,--no-whole-archive +$(BUILD_DIR)/test_objects/src/main_dot_c_test.cpp.o : $(PROJECT_DIR)/tests/src/main_dot_c_test.cpp + mkdir -p $(BUILD_DIR)/test_objects/src && $(CLANGXX) -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIC -I$(GTEST)/googletest/include -O0 -c -o $(BUILD_DIR)/test_objects/src/main_dot_c_test.cpp.o $(PROJECT_DIR)/tests/src/main_dot_c_test.cpp +$(BUILD_DIR)/recompiled/src/main : $(GTEST_MAIN) $(GTEST_ALL) $(BUILD_DIR)/test_objects/src/main_dot_c_test.cpp.o $(BUILD_DIR)/recompiled/libc-example-mini.so $(BUILD_DIR)/recompiled/lib/liblib.a + mkdir -p $(BUILD_DIR)/recompiled/src && $(CLANGXX) $(LDFLAGS) -L$(BUILD_DIR)/recompiled $(GTEST_MAIN) $(GTEST_ALL) $(BUILD_DIR)/test_objects/src/main_dot_c_test.cpp.o $(BUILD_DIR)/recompiled/libc-example-mini.so $(BUILD_DIR)/recompiled/lib/liblib.a -lpthread -fprofile-instr-generate -fsanitize=alignment,builtin,bounds,enum,float-cast-overflow,float-divide-by-zero,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,integer-divide-by-zero,nonnull-attribute,null,nullability-arg,nullability-assign,nullability-return,pointer-overflow,return,returns-nonnull-attribute,shift,unreachable,vla-bound -fsanitize=address -O0 -fuse-ld=gold -o $(BUILD_DIR)/recompiled/src/main +bin : .FORCE + echo $(BUILD_DIR)/recompiled/libc-example-mini.so +build : $(BUILD_DIR)/recompiled/src/main + +run : build + cd "$(BUILD_DIR)" && PATH=$$PATH:$(pwd) UBSAN_OPTIONS=print_stacktrace=1,report_error_type=1 ASAN_OPTIONS=debug=1,detect_odr_violation=1,detect_stack_use_after_return=1,detect_leaks=0 $(BUILD_DIR)/recompiled/src/main $(GTEST_FLAGS) +clean : + rm -rf $(BUILD_DIR) $(BUILD_DIR)/dependencies $(BUILD_DIR)/googletest/gtest-all.cc.o $(BUILD_DIR)/googletest/gtest_main.cc.o $(BUILD_DIR)/recompiled/CMakeFiles/c-example-mini.dir/src/main.c.o $(BUILD_DIR)/recompiled/lib/CMakeFiles/lib.dir/libfunc.c.o $(BUILD_DIR)/recompiled/lib/liblib.a $(BUILD_DIR)/recompiled/libc-example-mini.so $(BUILD_DIR)/test_objects/src/main_dot_c_test.cpp.o $(BUILD_DIR)/recompiled/src/main +.PRECIOUS: $(BUILD_DIR)/dependencies/%.d +$(BUILD_DIR)/dependencies/%.d: ; + +-include $(BUILD_DIR)/dependencies/*.Td $(BUILD_DIR)/dependencies/*.d + diff --git a/tests/makefiles/src/main.mk b/tests/makefiles/src/main.mk new file mode 100644 index 0000000..a1f567a --- /dev/null +++ b/tests/makefiles/src/main.mk @@ -0,0 +1,49 @@ +# This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + +# This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + +export PROJECT_DIR_RELATIVE_TO_MAKEFILE = ../../.. +export MAKEFILE_DIR = $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) +export PROJECT_DIR = $(MAKEFILE_DIR)/$(PROJECT_DIR_RELATIVE_TO_MAKEFILE) +export BUILD_RELATIVE = build/utbot_files/utbot_build +export BUILD_DIR = $(PROJECT_DIR)/$(BUILD_RELATIVE) +# This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + +ifndef UTBOT_ALL + export UTBOT_ALL = $(PROJECT_DIR)/utbot-release-2022.10.4/utbot_distr +endif +export UTBOT_INSTALL = $(UTBOT_ALL)/install +export ACCESS_PRIVATE_LIB = $(UTBOT_ALL)/access_private/include +export UTBOT_DEBS_INSTALL_DIR = $(UTBOT_ALL)/debs-install +export ASAN_LIB = $(UTBOT_DEBS_INSTALL_DIR)/usr/lib/x86_64-linux-gnu/libasan.so.5.0.0 +ifneq ("$(wildcard $(UTBOT_INSTALL)/bin/clang-10)\", "") + export CLANG = $(UTBOT_INSTALL)/bin/clang-10 +endif +ifneq ("$(wildcard $(UTBOT_INSTALL)/bin/clang++)\", "") + export CLANGXX = $(UTBOT_INSTALL)/bin/clang++ +endif +export GCC = gcc +export GXX = g++ +ifndef AR + export AR = $(UTBOT_DEBS_INSTALL_DIR)/usr/bin/x86_64-linux-gnu-ar +endif +ifndef LD_GOLD + export LD_GOLD = $(UTBOT_DEBS_INSTALL_DIR)/usr/bin/x86_64-linux-gnu-ld.gold +endif +ifndef LD + export LD = $(UTBOT_DEBS_INSTALL_DIR)/usr/bin/x86_64-linux-gnu-ld.bfd +endif +ifneq ("$(wildcard $(UTBOT_ALL)/gtest)\", "") + export GTEST = $(UTBOT_ALL)/gtest +endif +.FORCE : + +bin : .FORCE + $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/src/__main_shared.mk bin +build : .FORCE + $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/src/__main_shared.mk build || $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/src/__main_obj.mk build +run : .FORCE + $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/src/__main_shared.mk build && { $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/src/__main_shared.mk run; exit $$?; } || { $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/src/__main_obj.mk build && { $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/src/__main_obj.mk run; exit $$?; } } +clean : .FORCE + $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/src/__main_shared.mk clean + $(MAKE) -f $(PROJECT_DIR)/tests/makefiles/src/__main_obj.mk clean diff --git a/tests/src/main_dot_c_test.cpp b/tests/src/main_dot_c_test.cpp new file mode 100644 index 0000000..7c7449c --- /dev/null +++ b/tests/src/main_dot_c_test.cpp @@ -0,0 +1,239 @@ +/* + * This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + */ + +#include "main_dot_c_test.h" + +#include "gtest/gtest.h" +namespace UTBot { + + +#pragma region regression +TEST(regression, main_test_1) +{ + char _argv[2][2] = {{'c', 'a'}, {'-', 'c'}}; + char ** argv = (char **) calloc(3, sizeof(char *)); + for (int it_6_0 = 0; it_6_0 < 2; it_6_0 ++) { + argv[it_6_0] = _argv[it_6_0]; + } + argv[2] = NULL; + int actual = main(2, argv); + EXPECT_EQ(0, actual); + char expected_argv[2][2] = {{'c', 'a'}, {'-', 'c'}}; + for (int it_7_0 = 0; it_7_0 < 2; it_7_0 ++) { + for (int it_7_1 = 0; it_7_1 < 2; it_7_1 ++) { + EXPECT_EQ(expected_argv[it_7_0][it_7_1], _argv[it_7_0][it_7_1]); + } + } +} + +TEST(regression, main_test_2) +{ + char _argv[2][2] = {{'c', 'a'}, {'-', '{'}}; + char ** argv = (char **) calloc(3, sizeof(char *)); + for (int it_8_0 = 0; it_8_0 < 2; it_8_0 ++) { + argv[it_8_0] = _argv[it_8_0]; + } + argv[2] = NULL; + int actual = main(2, argv); + EXPECT_EQ(0, actual); + char expected_argv[2][2] = {{'c', 'a'}, {'-', '{'}}; + for (int it_9_0 = 0; it_9_0 < 2; it_9_0 ++) { + for (int it_9_1 = 0; it_9_1 < 2; it_9_1 ++) { + EXPECT_EQ(expected_argv[it_9_0][it_9_1], _argv[it_9_0][it_9_1]); + } + } +} + +TEST(regression, main_test_3) +{ + char _argv[2][2] = {{'c', 'a'}, {'\t', '@'}}; + char ** argv = (char **) calloc(3, sizeof(char *)); + for (int it_10_0 = 0; it_10_0 < 2; it_10_0 ++) { + argv[it_10_0] = _argv[it_10_0]; + } + argv[2] = NULL; + int actual = main(2, argv); + EXPECT_EQ(0, actual); + char expected_argv[2][2] = {{'c', 'a'}, {'\t', '@'}}; + for (int it_11_0 = 0; it_11_0 < 2; it_11_0 ++) { + for (int it_11_1 = 0; it_11_1 < 2; it_11_1 ++) { + EXPECT_EQ(expected_argv[it_11_0][it_11_1], _argv[it_11_0][it_11_1]); + } + } +} + +TEST(regression, main_test_4) +{ + char _argv[2][2] = {{'c', 'a'}, {'\t', 'a'}}; + char ** argv = (char **) calloc(3, sizeof(char *)); + for (int it_12_0 = 0; it_12_0 < 2; it_12_0 ++) { + argv[it_12_0] = _argv[it_12_0]; + } + argv[2] = NULL; + int actual = main(2, argv); + EXPECT_EQ(0, actual); + char expected_argv[2][2] = {{'c', 'a'}, {'\t', 'a'}}; + for (int it_13_0 = 0; it_13_0 < 2; it_13_0 ++) { + for (int it_13_1 = 0; it_13_1 < 2; it_13_1 ++) { + EXPECT_EQ(expected_argv[it_13_0][it_13_1], _argv[it_13_0][it_13_1]); + } + } +} + +TEST(regression, main_test_5) +{ + char _argv[2][2] = {{'c', 'a'}, {'\t', 'B'}}; + char ** argv = (char **) calloc(3, sizeof(char *)); + for (int it_14_0 = 0; it_14_0 < 2; it_14_0 ++) { + argv[it_14_0] = _argv[it_14_0]; + } + argv[2] = NULL; + int actual = main(2, argv); + EXPECT_EQ(0, actual); + char expected_argv[2][2] = {{'c', 'a'}, {'\t', 'B'}}; + for (int it_15_0 = 0; it_15_0 < 2; it_15_0 ++) { + for (int it_15_1 = 0; it_15_1 < 2; it_15_1 ++) { + EXPECT_EQ(expected_argv[it_15_0][it_15_1], _argv[it_15_0][it_15_1]); + } + } +} + +TEST(regression, main_test_6) +{ + char _argv[2][2] = {{'c', 'a'}, {'\t', '\0'}}; + char ** argv = (char **) calloc(3, sizeof(char *)); + for (int it_16_0 = 0; it_16_0 < 2; it_16_0 ++) { + argv[it_16_0] = _argv[it_16_0]; + } + argv[2] = NULL; + int actual = main(2, argv); + EXPECT_EQ(0, actual); + char expected_argv[2][2] = {{'c', 'a'}, {'\t', '\0'}}; + for (int it_17_0 = 0; it_17_0 < 2; it_17_0 ++) { + for (int it_17_1 = 0; it_17_1 < 2; it_17_1 ++) { + EXPECT_EQ(expected_argv[it_17_0][it_17_1], _argv[it_17_0][it_17_1]); + } + } +} + +TEST(regression, main_test_7) +{ + char _argv[2][2] = {{'c', 'a'}, {'a', 'a'}}; + char ** argv = (char **) calloc(3, sizeof(char *)); + for (int it_18_0 = 0; it_18_0 < 2; it_18_0 ++) { + argv[it_18_0] = _argv[it_18_0]; + } + argv[2] = NULL; + int actual = main(0, argv); + EXPECT_EQ(1, actual); + char expected_argv[2][2] = {{'c', 'a'}, {'a', 'a'}}; + for (int it_19_0 = 0; it_19_0 < 2; it_19_0 ++) { + for (int it_19_1 = 0; it_19_1 < 2; it_19_1 ++) { + EXPECT_EQ(expected_argv[it_19_0][it_19_1], _argv[it_19_0][it_19_1]); + } + } +} + +TEST(regression, main_test_8) +{ + char _argv[2][2] = {{'c', 'a'}, {'1', '@'}}; + char ** argv = (char **) calloc(3, sizeof(char *)); + for (int it_20_0 = 0; it_20_0 < 2; it_20_0 ++) { + argv[it_20_0] = _argv[it_20_0]; + } + argv[2] = NULL; + int actual = main(2, argv); + EXPECT_EQ(1, actual); + char expected_argv[2][2] = {{'c', 'a'}, {'1', '@'}}; + for (int it_21_0 = 0; it_21_0 < 2; it_21_0 ++) { + for (int it_21_1 = 0; it_21_1 < 2; it_21_1 ++) { + EXPECT_EQ(expected_argv[it_21_0][it_21_1], _argv[it_21_0][it_21_1]); + } + } +} + +TEST(regression, main_test_9) +{ + char _argv[2][2] = {{'c', 'a'}, {'-', 'B'}}; + char ** argv = (char **) calloc(3, sizeof(char *)); + for (int it_22_0 = 0; it_22_0 < 2; it_22_0 ++) { + argv[it_22_0] = _argv[it_22_0]; + } + argv[2] = NULL; + int actual = main(2, argv); + EXPECT_EQ(0, actual); + char expected_argv[2][2] = {{'c', 'a'}, {'-', 'B'}}; + for (int it_23_0 = 0; it_23_0 < 2; it_23_0 ++) { + for (int it_23_1 = 0; it_23_1 < 2; it_23_1 ++) { + EXPECT_EQ(expected_argv[it_23_0][it_23_1], _argv[it_23_0][it_23_1]); + } + } +} + +TEST(regression, main_test_10) +{ + char _argv[2][2] = {{'c', 'a'}, {'1', '\0'}}; + char ** argv = (char **) calloc(3, sizeof(char *)); + for (int it_24_0 = 0; it_24_0 < 2; it_24_0 ++) { + argv[it_24_0] = _argv[it_24_0]; + } + argv[2] = NULL; + int actual = main(2, argv); + EXPECT_EQ(1, actual); + char expected_argv[2][2] = {{'c', 'a'}, {'1', '\0'}}; + for (int it_25_0 = 0; it_25_0 < 2; it_25_0 ++) { + for (int it_25_1 = 0; it_25_1 < 2; it_25_1 ++) { + EXPECT_EQ(expected_argv[it_25_0][it_25_1], _argv[it_25_0][it_25_1]); + } + } +} + +#pragma endregion +#pragma region error +TEST(error, main_test_11) +{ + char _argv[2][2] = {{'b', 'c'}, {'-', '0'}}; + char ** argv = (char **) calloc(3, sizeof(char *)); + for (int it_26_0 = 0; it_26_0 < 2; it_26_0 ++) { + argv[it_26_0] = _argv[it_26_0]; + } + argv[2] = NULL; + main(2, argv); +} + +TEST(error, main_test_12) +{ + char _argv[2][2] = {{'b', 'c'}, {'\n', '+'}}; + char ** argv = (char **) calloc(3, sizeof(char *)); + for (int it_27_0 = 0; it_27_0 < 2; it_27_0 ++) { + argv[it_27_0] = _argv[it_27_0]; + } + argv[2] = NULL; + main(2, argv); +} + +TEST(error, main_test_13) +{ + char _argv[2][2] = {{'b', 'c'}, {'\n', '-'}}; + char ** argv = (char **) calloc(3, sizeof(char *)); + for (int it_28_0 = 0; it_28_0 < 2; it_28_0 ++) { + argv[it_28_0] = _argv[it_28_0]; + } + argv[2] = NULL; + main(2, argv); +} + +TEST(error, main_test_14) +{ + char _argv[2][2] = {{'b', 'c'}, {'\n', '\r'}}; + char ** argv = (char **) calloc(3, sizeof(char *)); + for (int it_29_0 = 0; it_29_0 < 2; it_29_0 ++) { + argv[it_29_0] = _argv[it_29_0]; + } + argv[2] = NULL; + main(2, argv); +} + +#pragma endregion +} diff --git a/tests/src/main_dot_c_test.h b/tests/src/main_dot_c_test.h new file mode 100644 index 0000000..0df949e --- /dev/null +++ b/tests/src/main_dot_c_test.h @@ -0,0 +1,527 @@ +/* + * This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + */ + +namespace UTBot { +#define typeid typeid_ +#define throw throw_ +#define thread_local thread_local_ +#define template template_ +#define static_cast static_cast_ +#define requires requires_ +#define public public_ +#define protected protected_ +#define reflexpr reflexpr_ +#define operator operator_ +#define noexcept noexcept_ +#define new new_ +#define namespace namespace_ +#define mutable mutable_ +#define try try_ +#define private private_ +#define friend friend_ +#define virtual virtual_ +#define nullptr nullptr_ +#define export export_ +#define this this_ +#define explicit explicit_ +#define typename typename_ +#define delete delete_ +#define decltype decltype_ +#define co_yield co_yield_ +#define co_return co_return_ +#define co_await co_await_ +#define const_cast const_cast_ +#define constinit constinit_ +#define consteval consteval_ +#define class class_ +#define synchronized synchronized_ +#define char32_t char32_t_ +#define constexpr constexpr_ +#define char8_t char8_t_ +#define catch catch_ +#define using using_ +#define char16_t char16_t_ +#define atomic_noexcept atomic_noexcept_ +#define concept concept_ +#define atomic_commit atomic_commit_ +#define static_assert static_assert_ +#define atomic_cancel atomic_cancel_ +#define dynamic_cast dynamic_cast_ +#define asm asm_ +#define reinterpret_cast reinterpret_cast_ +#define alignof alignof_ +#define alignas alignas_ +#define _Alignas(x) +#define _Atomic(x) x +#define _Bool bool +#define _Noreturn +#define _Thread_local thread_local + +struct __va_list_tag; +typedef unsigned long size_t; + +#define wchar_t int +typedef enum { + P_ALL, + P_PID, + P_PGID +} idtype_t; + +typedef float _Float32; + +typedef double _Float64; + +typedef double _Float32x; + +typedef long double _Float64x; + +typedef struct { + int quot; + int rem; +} div_t; + +typedef struct { + long quot; + long rem; +} ldiv_t; + +typedef struct { + long long quot; + long long rem; +} lldiv_t; + +typedef unsigned char __u_char; + +typedef unsigned short __u_short; + +typedef unsigned int __u_int; + +typedef unsigned long __u_long; + +typedef signed char __int8_t; + +typedef unsigned char __uint8_t; + +typedef short __int16_t; + +typedef unsigned short __uint16_t; + +typedef int __int32_t; + +typedef unsigned int __uint32_t; + +typedef long __int64_t; + +typedef unsigned long __uint64_t; + +typedef long __quad_t; + +typedef unsigned long __u_quad_t; + +typedef long __intmax_t; + +typedef unsigned long __uintmax_t; + +typedef unsigned long __dev_t; + +typedef unsigned int __uid_t; + +typedef unsigned int __gid_t; + +typedef unsigned long __ino_t; + +typedef unsigned long __ino64_t; + +typedef unsigned int __mode_t; + +typedef unsigned long __nlink_t; + +typedef long __off_t; + +typedef long __off64_t; + +typedef int __pid_t; + +typedef struct { + int __val[2]; +} __fsid_t; + +typedef long __clock_t; + +typedef unsigned long __rlim_t; + +typedef unsigned long __rlim64_t; + +typedef unsigned int __id_t; + +typedef long __time_t; + +typedef unsigned int __useconds_t; + +typedef long __suseconds_t; + +typedef int __daddr_t; + +typedef int __key_t; + +typedef int __clockid_t; + +typedef void *__timer_t; + +typedef long __blksize_t; + +typedef long __blkcnt_t; + +typedef long __blkcnt64_t; + +typedef unsigned long __fsblkcnt_t; + +typedef unsigned long __fsblkcnt64_t; + +typedef unsigned long __fsfilcnt_t; + +typedef unsigned long __fsfilcnt64_t; + +typedef long __fsword_t; + +typedef long __ssize_t; + +typedef long __syscall_slong_t; + +typedef unsigned long __syscall_ulong_t; + +typedef __off64_t __loff_t; + +typedef char *__caddr_t; + +typedef long __intptr_t; + +typedef unsigned int __socklen_t; + +typedef int __sig_atomic_t; + +typedef __u_char u_char; + +typedef __u_short u_short; + +typedef __u_int u_int; + +typedef __u_long u_long; + +typedef __quad_t quad_t; + +typedef __u_quad_t u_quad_t; + +typedef __fsid_t fsid_t; + +typedef __loff_t loff_t; + +typedef __ino_t ino_t; + +typedef __dev_t dev_t; + +typedef __gid_t gid_t; + +typedef __mode_t mode_t; + +typedef __nlink_t nlink_t; + +typedef __uid_t uid_t; + +typedef __off_t off_t; + +typedef __pid_t pid_t; + +typedef __id_t id_t; + +typedef __ssize_t ssize_t; + +typedef __daddr_t daddr_t; + +typedef __caddr_t caddr_t; + +typedef __key_t key_t; + +typedef __clock_t clock_t; + +typedef __clockid_t clockid_t; + +typedef __time_t time_t; + +typedef __timer_t timer_t; + +typedef unsigned long ulong; + +typedef unsigned short ushort; + +typedef unsigned int uint; + +typedef __int8_t int8_t; + +typedef __int16_t int16_t; + +typedef __int32_t int32_t; + +typedef __int64_t int64_t; + +typedef unsigned int u_int8_t __attribute__((mode(__QI__))); + +typedef unsigned int u_int16_t __attribute__((mode(__HI__))); + +typedef unsigned int u_int32_t __attribute__((mode(__SI__))); + +typedef unsigned int u_int64_t __attribute__((mode(__DI__))); + +typedef int register_t __attribute__((mode(__word__))); + +typedef struct { + unsigned long __val[16]; +} __sigset_t; + +typedef __sigset_t sigset_t; + +struct timeval { + __time_t tv_sec; + __suseconds_t tv_usec; +}; + +struct timespec { + __time_t tv_sec; + __syscall_slong_t tv_nsec; +}; + +typedef __suseconds_t suseconds_t; + +typedef long __fd_mask; + +typedef struct { + __fd_mask __fds_bits[16]; +} fd_set; + +typedef __fd_mask fd_mask; + +typedef __blksize_t blksize_t; + +typedef __blkcnt_t blkcnt_t; + +typedef __fsblkcnt_t fsblkcnt_t; + +typedef __fsfilcnt_t fsfilcnt_t; + +struct __pthread_rwlock_arch_t { + unsigned int __readers; + unsigned int __writers; + unsigned int __wrphase_futex; + unsigned int __writers_futex; + unsigned int __pad3; + unsigned int __pad4; + int __cur_writer; + int __shared; + signed char __rwelision; + unsigned char __pad1[7]; + unsigned long __pad2; + unsigned int __flags; +}; + +struct __pthread_internal_list { + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +}; + +typedef struct __pthread_internal_list __pthread_list_t; + +struct __pthread_mutex_s { + int __lock; + unsigned int __count; + int __owner; + unsigned int __nusers; + int __kind; + short __spins; + short __elision; + __pthread_list_t __list; +}; + +struct __pthread_cond_s { + union { + unsigned long long __wseq; + struct { + unsigned int __low; + unsigned int __high; + } __wseq32; + }; + union { + unsigned long long __g1_start; + struct { + unsigned int __low; + unsigned int __high; + } __g1_start32; + }; + unsigned int __g_refs[2]; + unsigned int __g_size[2]; + unsigned int __g1_orig_size; + unsigned int __wrefs; + unsigned int __g_signals[2]; +}; + +typedef unsigned long pthread_t; + +typedef union { + char __size[4]; + int __align; +} pthread_mutexattr_t; + +typedef union { + char __size[4]; + int __align; +} pthread_condattr_t; + +typedef unsigned int pthread_key_t; + +typedef int pthread_once_t; + +union pthread_attr_t { + char __size[56]; + long __align; +}; + +typedef union pthread_attr_t pthread_attr_t; + +typedef union { + struct __pthread_mutex_s __data; + char __size[40]; + long __align; +} pthread_mutex_t; + +typedef union { + struct __pthread_cond_s __data; + char __size[48]; + long long __align; +} pthread_cond_t; + +typedef union { + struct __pthread_rwlock_arch_t __data; + char __size[56]; + long __align; +} pthread_rwlock_t; + +typedef union { + char __size[8]; + long __align; +} pthread_rwlockattr_t; + +typedef volatile int pthread_spinlock_t; + +typedef union { + char __size[32]; + long __align; +} pthread_barrier_t; + +typedef union { + char __size[4]; + int __align; +} pthread_barrierattr_t; + +struct random_data { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; +}; + +struct drand48_data { + unsigned short __x[3]; + unsigned short __old_x[3]; + unsigned short __c; + unsigned short __init; + unsigned long long __a; +}; + +typedef int (*__compar_fn_t)(const void *, const void *); + + +extern "C" int main_src_main_c(int argc, char *argv[]); +static int main(int argc, char *argv[]) { +return main_src_main_c(argc, argv); +} + +#ifdef wchar_t +#undef wchar_t +#endif + +} +#undef typeid +#undef throw +#undef thread_local +#undef template +#undef static_cast +#undef requires +#undef public +#undef protected +#undef reflexpr +#undef operator +#undef noexcept +#undef new +#undef namespace +#undef mutable +#undef try +#undef private +#undef friend +#undef virtual +#undef nullptr +#undef export +#undef this +#undef explicit +#undef typename +#undef delete +#undef decltype +#undef co_yield +#undef co_return +#undef co_await +#undef const_cast +#undef constinit +#undef consteval +#undef class +#undef synchronized +#undef char32_t +#undef constexpr +#undef char8_t +#undef catch +#undef using +#undef char16_t +#undef atomic_noexcept +#undef concept +#undef atomic_commit +#undef static_assert +#undef atomic_cancel +#undef dynamic_cast +#undef asm +#undef reinterpret_cast +#undef alignof +#undef alignas +#include + +#include + + +void utbot_redirect_stdin(const char* buf, int &res) { + int fds[2]; + if (pipe(fds) == -1) { + res = -1; + return; + } + close(STDIN_FILENO); + dup2(fds[0], STDIN_FILENO); + write(fds[1], buf, 64); + close(fds[1]); +} + +template +T from_bytes(const char (&bytes)[N]) { + T result; + std::memcpy(&result, bytes, sizeof(result)); + return result; +} diff --git a/tests/stubs/lib/libfunc_stub.c b/tests/stubs/lib/libfunc_stub.c new file mode 100644 index 0000000..480a9f0 --- /dev/null +++ b/tests/stubs/lib/libfunc_stub.c @@ -0,0 +1,35 @@ +// 1665482606000000000 +// Please, do not change the line above + +/* + * This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + */ + +#ifdef KLEE_MODE +extern void klee_make_symbolic(void *addr, unsigned long long nbytes, const char *name); +#endif +#include "libfunc_stub.h" + +#define NULL ((void*)0) + +int libfunc_symbolic[10]; +int _libfunc_symbolic[10]; +int libfunc(int a) { + static int firstTimeCall = 1; + static int cntCall = 0; + #ifdef KLEE_MODE + if (firstTimeCall == 1) { + firstTimeCall = 0; + klee_make_symbolic(&_libfunc_symbolic, sizeof(_libfunc_symbolic), "_libfunc_symbolic"); + for (int it_1_0 = 0; it_1_0 < 10; it_1_0 ++) { + klee_prefer_cex(_libfunc_symbolic, _libfunc_symbolic[it_1_0] >= -10 & _libfunc_symbolic[it_1_0] <= 10); + } + } + #endif + if (cntCall == 10) { + cntCall--; + } + return _libfunc_symbolic[cntCall++]; +} + + diff --git a/tests/stubs/lib/libfunc_stub.h b/tests/stubs/lib/libfunc_stub.h new file mode 100644 index 0000000..63064aa --- /dev/null +++ b/tests/stubs/lib/libfunc_stub.h @@ -0,0 +1,8 @@ +//1665482606000000000 +//Please, do not change the line above +/* + * This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + */ + +#define _Alignas(x) + diff --git a/tests/stubs/src/main_stub.c b/tests/stubs/src/main_stub.c new file mode 100644 index 0000000..fbfb79e --- /dev/null +++ b/tests/stubs/src/main_stub.c @@ -0,0 +1,35 @@ +// 1665482606000000000 +// Please, do not change the line above + +/* + * This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + */ + +#ifdef KLEE_MODE +extern void klee_make_symbolic(void *addr, unsigned long long nbytes, const char *name); +#endif +#include "main_stub.h" + +#define NULL ((void*)0) + +int main_symbolic[10]; +int _main_symbolic[10]; +int main(int argc, char ** argv) { + static int firstTimeCall = 1; + static int cntCall = 0; + #ifdef KLEE_MODE + if (firstTimeCall == 1) { + firstTimeCall = 0; + klee_make_symbolic(&_main_symbolic, sizeof(_main_symbolic), "_main_symbolic"); + for (int it_2_0 = 0; it_2_0 < 10; it_2_0 ++) { + klee_prefer_cex(_main_symbolic, _main_symbolic[it_2_0] >= -10 & _main_symbolic[it_2_0] <= 10); + } + } + #endif + if (cntCall == 10) { + cntCall--; + } + return _main_symbolic[cntCall++]; +} + + diff --git a/tests/stubs/src/main_stub.h b/tests/stubs/src/main_stub.h new file mode 100644 index 0000000..34bdb4d --- /dev/null +++ b/tests/stubs/src/main_stub.h @@ -0,0 +1,392 @@ +//1665482606000000000 +//Please, do not change the line above +/* + * This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + */ + +#define _Alignas(x) +typedef unsigned long size_t; + +typedef int wchar_t; + +typedef enum { + P_ALL, + P_PID, + P_PGID +} idtype_t; + +typedef float _Float32; + +typedef double _Float64; + +typedef double _Float32x; + +typedef long double _Float64x; + +typedef struct { + int quot; + int rem; +} div_t; + +typedef struct { + long quot; + long rem; +} ldiv_t; + +typedef struct { + long long quot; + long long rem; +} lldiv_t; + +typedef unsigned char __u_char; + +typedef unsigned short __u_short; + +typedef unsigned int __u_int; + +typedef unsigned long __u_long; + +typedef signed char __int8_t; + +typedef unsigned char __uint8_t; + +typedef short __int16_t; + +typedef unsigned short __uint16_t; + +typedef int __int32_t; + +typedef unsigned int __uint32_t; + +typedef long __int64_t; + +typedef unsigned long __uint64_t; + +typedef long __quad_t; + +typedef unsigned long __u_quad_t; + +typedef long __intmax_t; + +typedef unsigned long __uintmax_t; + +typedef unsigned long __dev_t; + +typedef unsigned int __uid_t; + +typedef unsigned int __gid_t; + +typedef unsigned long __ino_t; + +typedef unsigned long __ino64_t; + +typedef unsigned int __mode_t; + +typedef unsigned long __nlink_t; + +typedef long __off_t; + +typedef long __off64_t; + +typedef int __pid_t; + +typedef struct { + int __val[2]; +} __fsid_t; + +typedef long __clock_t; + +typedef unsigned long __rlim_t; + +typedef unsigned long __rlim64_t; + +typedef unsigned int __id_t; + +typedef long __time_t; + +typedef unsigned int __useconds_t; + +typedef long __suseconds_t; + +typedef int __daddr_t; + +typedef int __key_t; + +typedef int __clockid_t; + +typedef void *__timer_t; + +typedef long __blksize_t; + +typedef long __blkcnt_t; + +typedef long __blkcnt64_t; + +typedef unsigned long __fsblkcnt_t; + +typedef unsigned long __fsblkcnt64_t; + +typedef unsigned long __fsfilcnt_t; + +typedef unsigned long __fsfilcnt64_t; + +typedef long __fsword_t; + +typedef long __ssize_t; + +typedef long __syscall_slong_t; + +typedef unsigned long __syscall_ulong_t; + +typedef __off64_t __loff_t; + +typedef char *__caddr_t; + +typedef long __intptr_t; + +typedef unsigned int __socklen_t; + +typedef int __sig_atomic_t; + +typedef __u_char u_char; + +typedef __u_short u_short; + +typedef __u_int u_int; + +typedef __u_long u_long; + +typedef __quad_t quad_t; + +typedef __u_quad_t u_quad_t; + +typedef __fsid_t fsid_t; + +typedef __loff_t loff_t; + +typedef __ino_t ino_t; + +typedef __dev_t dev_t; + +typedef __gid_t gid_t; + +typedef __mode_t mode_t; + +typedef __nlink_t nlink_t; + +typedef __uid_t uid_t; + +typedef __off_t off_t; + +typedef __pid_t pid_t; + +typedef __id_t id_t; + +typedef __ssize_t ssize_t; + +typedef __daddr_t daddr_t; + +typedef __caddr_t caddr_t; + +typedef __key_t key_t; + +typedef __clock_t clock_t; + +typedef __clockid_t clockid_t; + +typedef __time_t time_t; + +typedef __timer_t timer_t; + +typedef unsigned long ulong; + +typedef unsigned short ushort; + +typedef unsigned int uint; + +typedef __int8_t int8_t; + +typedef __int16_t int16_t; + +typedef __int32_t int32_t; + +typedef __int64_t int64_t; + +typedef unsigned int u_int8_t __attribute__((mode(__QI__))); + +typedef unsigned int u_int16_t __attribute__((mode(__HI__))); + +typedef unsigned int u_int32_t __attribute__((mode(__SI__))); + +typedef unsigned int u_int64_t __attribute__((mode(__DI__))); + +typedef int register_t __attribute__((mode(__word__))); + +typedef struct { + unsigned long __val[16]; +} __sigset_t; + +typedef __sigset_t sigset_t; + +struct timeval { + __time_t tv_sec; + __suseconds_t tv_usec; +}; + +struct timespec { + __time_t tv_sec; + __syscall_slong_t tv_nsec; +}; + +typedef __suseconds_t suseconds_t; + +typedef long __fd_mask; + +typedef struct { + __fd_mask __fds_bits[16]; +} fd_set; + +typedef __fd_mask fd_mask; + +typedef __blksize_t blksize_t; + +typedef __blkcnt_t blkcnt_t; + +typedef __fsblkcnt_t fsblkcnt_t; + +typedef __fsfilcnt_t fsfilcnt_t; + +struct __pthread_rwlock_arch_t { + unsigned int __readers; + unsigned int __writers; + unsigned int __wrphase_futex; + unsigned int __writers_futex; + unsigned int __pad3; + unsigned int __pad4; + int __cur_writer; + int __shared; + signed char __rwelision; + unsigned char __pad1[7]; + unsigned long __pad2; + unsigned int __flags; +}; + +struct __pthread_internal_list { + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +}; + +typedef struct __pthread_internal_list __pthread_list_t; + +struct __pthread_mutex_s { + int __lock; + unsigned int __count; + int __owner; + unsigned int __nusers; + int __kind; + short __spins; + short __elision; + __pthread_list_t __list; +}; + +struct __pthread_cond_s { + union { + unsigned long long __wseq; + struct { + unsigned int __low; + unsigned int __high; + } __wseq32; + }; + union { + unsigned long long __g1_start; + struct { + unsigned int __low; + unsigned int __high; + } __g1_start32; + }; + unsigned int __g_refs[2]; + unsigned int __g_size[2]; + unsigned int __g1_orig_size; + unsigned int __wrefs; + unsigned int __g_signals[2]; +}; + +typedef unsigned long pthread_t; + +typedef union { + char __size[4]; + int __align; +} pthread_mutexattr_t; + +typedef union { + char __size[4]; + int __align; +} pthread_condattr_t; + +typedef unsigned int pthread_key_t; + +typedef int pthread_once_t; + +union pthread_attr_t { + char __size[56]; + long __align; +}; + +typedef union pthread_attr_t pthread_attr_t; + +typedef union { + struct __pthread_mutex_s __data; + char __size[40]; + long __align; +} pthread_mutex_t; + +typedef union { + struct __pthread_cond_s __data; + char __size[48]; + long long __align; +} pthread_cond_t; + +typedef union { + struct __pthread_rwlock_arch_t __data; + char __size[56]; + long __align; +} pthread_rwlock_t; + +typedef union { + char __size[8]; + long __align; +} pthread_rwlockattr_t; + +typedef volatile int pthread_spinlock_t; + +typedef union { + char __size[32]; + long __align; +} pthread_barrier_t; + +typedef union { + char __size[4]; + int __align; +} pthread_barrierattr_t; + +struct random_data { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; +}; + +struct drand48_data { + unsigned short __x[3]; + unsigned short __old_x[3]; + unsigned short __c; + unsigned short __init; + unsigned long long __a; +}; + +typedef int (*__compar_fn_t)(const void *, const void *); + + diff --git a/tests/wrapper/lib/libfunc_wrapper.c b/tests/wrapper/lib/libfunc_wrapper.c new file mode 100644 index 0000000..af12c4f --- /dev/null +++ b/tests/wrapper/lib/libfunc_wrapper.c @@ -0,0 +1,9 @@ +/* + * This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + */ + +#define main main__ +#include "../../../lib/libfunc.c" +int libfunc_lib_libfunc_c(int a) { +return libfunc(a); +} diff --git a/tests/wrapper/src/main_wrapper.c b/tests/wrapper/src/main_wrapper.c new file mode 100644 index 0000000..d770e47 --- /dev/null +++ b/tests/wrapper/src/main_wrapper.c @@ -0,0 +1,9 @@ +/* + * This file is automatically generated by UnitTestBot. For further information see https://www.utbot.org + */ + +#define main main__ +#include "../../../src/main.c" +int main_src_main_c(int argc, char *argv[]) { +return main(argc, argv); +} diff --git a/utbot_report/execution-stats.csv b/utbot_report/execution-stats.csv new file mode 100644 index 0000000..1dee86a --- /dev/null +++ b/utbot_report/execution-stats.csv @@ -0,0 +1,4 @@ +File,Google Test Execution Time (s),Total Tests Number,Passed Tests Number,Failed Tests Number,Death Tests Number,Interrupted Tests Number,Total Lines Number,Covered Lines Number,Line Coverage Ratio (%) +lib/libfunc.c,0.001,2,1,0,1,0,3,3,100.000000 +src/main.c,0.001,14,7,7,0,0,10,10,100.000000 +Total:,0.002,16,8,7,1,0,13,13,100.000000 diff --git a/utbot_report/generation-stats.csv b/utbot_report/generation-stats.csv new file mode 100644 index 0000000..39e67a8 --- /dev/null +++ b/utbot_report/generation-stats.csv @@ -0,0 +1,4 @@ +File,Klee Time (s),Solver Time (s),Resolution Time (s),Regression Tests Generated,Error Tests Generated,Covered Functions,Total functions +src/main.c,0.00,0.00,0.00,10,4,1,1 +lib/libfunc.c,0.00,0.00,0.00,1,1,1,1 +Total:,0.00 (preprocessing +0.23),0.00,0.00,11,5,2,2 diff --git a/utbot_report/project_code_analysis.sarif b/utbot_report/project_code_analysis.sarif new file mode 100644 index 0000000..cc66379 --- /dev/null +++ b/utbot_report/project_code_analysis.sarif @@ -0,0 +1,858 @@ +{ + "$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json", + "runs": [ + { + "results": [ + { + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "message": { + "text": "libfunc (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "lib/libfunc.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 4 + } + } + }, + "module": "project" + }, + { + "location": { + "message": { + "text": "error.libfunc_test_2 (test)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "tests/lib/libfunc_dot_c_test.cpp", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 22 + } + } + }, + "module": "test" + } + ], + "message": { + "text": "UTBot generated" + } + } + ] + } + ], + "kind": "fail", + "level": "error", + "locations": [ + { + "message": { + "text": "libfunc (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "lib/libfunc.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 4 + } + } + } + ], + "message": { + "text": " overflow on division or remainder" + }, + "ruleId": "overflow", + "stacks": [ + { + "frames": [ + { + "location": { + "message": { + "text": "libfunc (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "lib/libfunc.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 4 + } + } + }, + "module": "project" + }, + { + "location": { + "message": { + "text": "error.libfunc_test_2 (test)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "tests/lib/libfunc_dot_c_test.cpp", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 22 + } + } + }, + "module": "test" + } + ], + "message": { + "text": "UTBot generated" + } + } + ] + }, + { + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "message": { + "text": "strtol (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "strtol.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 105 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "atoi (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "atoi.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 36 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "main (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "src/main.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 6 + } + } + }, + "module": "project" + }, + { + "location": { + "message": { + "text": "error.main_test_11 (test)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "tests/src/main_dot_c_test.cpp", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 202 + } + } + }, + "module": "test" + } + ], + "message": { + "text": "UTBot generated" + } + } + ] + } + ], + "kind": "fail", + "level": "error", + "locations": [ + { + "message": { + "text": "main (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "src/main.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 6 + } + } + } + ], + "message": { + "text": " memory error: out of bound pointer" + }, + "ruleId": "ptr", + "stacks": [ + { + "frames": [ + { + "location": { + "message": { + "text": "strtol (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "strtol.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 105 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "atoi (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "atoi.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 36 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "main (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "src/main.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 6 + } + } + }, + "module": "project" + }, + { + "location": { + "message": { + "text": "error.main_test_11 (test)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "tests/src/main_dot_c_test.cpp", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 202 + } + } + }, + "module": "test" + } + ], + "message": { + "text": "UTBot generated" + } + } + ] + }, + { + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "message": { + "text": "strtol (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "strtol.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 70 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "atoi (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "atoi.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 36 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "main (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "src/main.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 6 + } + } + }, + "module": "project" + }, + { + "location": { + "message": { + "text": "error.main_test_12 (test)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "tests/src/main_dot_c_test.cpp", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 213 + } + } + }, + "module": "test" + } + ], + "message": { + "text": "UTBot generated" + } + } + ] + } + ], + "kind": "fail", + "level": "error", + "locations": [ + { + "message": { + "text": "main (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "src/main.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 6 + } + } + } + ], + "message": { + "text": " memory error: out of bound pointer" + }, + "ruleId": "ptr", + "stacks": [ + { + "frames": [ + { + "location": { + "message": { + "text": "strtol (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "strtol.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 70 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "atoi (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "atoi.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 36 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "main (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "src/main.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 6 + } + } + }, + "module": "project" + }, + { + "location": { + "message": { + "text": "error.main_test_12 (test)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "tests/src/main_dot_c_test.cpp", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 213 + } + } + }, + "module": "test" + } + ], + "message": { + "text": "UTBot generated" + } + } + ] + }, + { + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "message": { + "text": "strtol (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "strtol.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 66 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "atoi (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "atoi.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 36 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "main (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "src/main.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 6 + } + } + }, + "module": "project" + }, + { + "location": { + "message": { + "text": "error.main_test_13 (test)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "tests/src/main_dot_c_test.cpp", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 224 + } + } + }, + "module": "test" + } + ], + "message": { + "text": "UTBot generated" + } + } + ] + } + ], + "kind": "fail", + "level": "error", + "locations": [ + { + "message": { + "text": "main (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "src/main.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 6 + } + } + } + ], + "message": { + "text": " memory error: out of bound pointer" + }, + "ruleId": "ptr", + "stacks": [ + { + "frames": [ + { + "location": { + "message": { + "text": "strtol (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "strtol.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 66 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "atoi (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "atoi.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 36 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "main (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "src/main.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 6 + } + } + }, + "module": "project" + }, + { + "location": { + "message": { + "text": "error.main_test_13 (test)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "tests/src/main_dot_c_test.cpp", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 224 + } + } + }, + "module": "test" + } + ], + "message": { + "text": "UTBot generated" + } + } + ] + }, + { + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "message": { + "text": "strtol (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "strtol.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 62 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "atoi (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "atoi.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 36 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "main (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "src/main.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 6 + } + } + }, + "module": "project" + }, + { + "location": { + "message": { + "text": "error.main_test_14 (test)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "tests/src/main_dot_c_test.cpp", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 235 + } + } + }, + "module": "test" + } + ], + "message": { + "text": "UTBot generated" + } + } + ] + } + ], + "kind": "fail", + "level": "error", + "locations": [ + { + "message": { + "text": "main (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "src/main.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 6 + } + } + } + ], + "message": { + "text": " memory error: out of bound pointer" + }, + "ruleId": "ptr", + "stacks": [ + { + "frames": [ + { + "location": { + "message": { + "text": "strtol (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "strtol.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 62 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "atoi (external)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "atoi.c", + "uriBaseId": "%PATH%" + }, + "region": { + "startLine": 36 + } + } + }, + "module": "external" + }, + { + "location": { + "message": { + "text": "main (source)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "src/main.c", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 6 + } + } + }, + "module": "project" + }, + { + "location": { + "message": { + "text": "error.main_test_14 (test)" + }, + "physicalLocation": { + "artifactLocation": { + "uri": "tests/src/main_dot_c_test.cpp", + "uriBaseId": "%SRCROOT%" + }, + "region": { + "startLine": 235 + } + } + }, + "module": "test" + } + ], + "message": { + "text": "UTBot generated" + } + } + ] + } + ], + "tool": { + "driver": { + "informationUri": "https://utbot.org", + "name": "UTBotCpp" + } + } + } + ], + "version": "2.1.0" +} \ No newline at end of file diff --git a/utbot_report/tests-result.log b/utbot_report/tests-result.log new file mode 100644 index 0000000..e520b4b --- /dev/null +++ b/utbot_report/tests-result.log @@ -0,0 +1,37 @@ +Test results summary. +==== Tests in "/home/runner/work/UTBotCpp-test-project/UTBotCpp-test-project/tests/src/main_dot_c_test.cpp" +======== main_test_14 -> PASSED +======== main_test_1 -> FAILED +======== main_test_2 -> FAILED +======== main_test_5 -> FAILED +======== main_test_3 -> FAILED +======== main_test_10 -> PASSED +======== main_test_4 -> FAILED +======== main_test_8 -> PASSED +======== main_test_6 -> FAILED +======== main_test_9 -> FAILED +======== main_test_12 -> PASSED +======== main_test_7 -> PASSED +======== main_test_13 -> PASSED +======== main_test_11 -> PASSED +==== Tests in "/home/runner/work/UTBotCpp-test-project/UTBotCpp-test-project/tests/lib/libfunc_dot_c_test.cpp" +======== libfunc_test_2 -> DEATH +======== libfunc_test_1 -> PASSED +Coverage summary. +==== Coverage in "/home/runner/work/UTBotCpp-test-project/UTBotCpp-test-project/tests/wrapper/lib/libfunc_wrapper.c" +======== covered lines: 6 7 8 +======== uncovered line ranges: +==== Coverage in "/home/runner/work/UTBotCpp-test-project/UTBotCpp-test-project/lib/libfunc.c" +======== covered lines: 2 3 4 +======== uncovered line ranges: +==== Coverage in "/home/runner/work/UTBotCpp-test-project/UTBotCpp-test-project/utbot-release-2022.10.4/utbot_distr/debs-install/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" +======== covered lines: +======== uncovered line ranges: 33 34 35 39 40 41 45 46 47 +==== Coverage in "/home/runner/work/UTBotCpp-test-project/UTBotCpp-test-project/tests/wrapper/src/main_wrapper.c" +======== covered lines: 4 6 7 8 +======== uncovered line ranges: +==== Coverage in "/home/runner/work/UTBotCpp-test-project/UTBotCpp-test-project/src/main.c" +======== covered lines: 3 4 5 6 7 8 9 10 11 12 +======== uncovered line ranges: +Totals: +{"functions":{"count":2,"covered":2,"percent":100},"instantiations":{"count":2,"covered":2,"percent":100},"lines":{"count":13,"covered":13,"percent":100},"regions":{"count":7,"covered":7,"notcovered":0,"percent":100}} \ No newline at end of file