diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 8cbacf1..0000000 --- a/.appveyor.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: '{build}-appveyor' -image: Visual Studio 2017 -build: - verbosity: minimal -test_script: -- cmd: >- - C:\projects\fff\test\ms_vc_fff_test\x64\Debug\ms_vc_fff_test_c.exe - - C:\projects\fff\test\ms_vc_fff_test\x64\Debug\ms_vc_fff_test_cpp.exe - - C:\projects\fff\test\ms_vc_fff_test\x64\Debug\ms_vc_fff_test_global_cpp.exe - - C:\projects\fff\test\ms_vc_fff_test\x64\Debug\ms_vc_fff_test_global_c.exe \ No newline at end of file diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml deleted file mode 100644 index d6abf01..0000000 --- a/.github/workflows/msbuild.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: MSBuild - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -env: - # Path to the solution file relative to the root of the project. - SOLUTION_FILE_PATH: test/ms_vc_fff_test/ms_vc_fff_test.sln - - # Configuration type to build. - # You can convert this to a build matrix if you need coverage of multiple configuration types. - # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - BUILD_CONFIGURATION: Release - -permissions: - contents: read - -jobs: - build: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v3 - - - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 - - - name: Restore NuGet packages - working-directory: ${{env.GITHUB_WORKSPACE}} - run: nuget restore ${{env.SOLUTION_FILE_PATH}} - - - name: Build - working-directory: ${{env.GITHUB_WORKSPACE}} - # Add additional options to the MSBuild command line here (like platform or verbosity level). - # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference - run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} diff --git a/.github/workflows/verify_pr.yaml b/.github/workflows/verify_pr.yaml new file mode 100644 index 0000000..7e8c329 --- /dev/null +++ b/.github/workflows/verify_pr.yaml @@ -0,0 +1,21 @@ +name: Check PR + +on: + pull_request: + branches: + - master + +jobs: + check-pr: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + - uses: actions/checkout@v3 + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build + - name: Build + run: cmake --build ${{github.workspace}}/build + - name: Test + run: ctest --test-dir ${{github.workspace}} --output-on-failure diff --git a/.gitignore b/.gitignore index 142c463..42ff828 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,9 @@ bld/ # Visual Studio 2015/2017 cache/options directory .vs/ +# IntelliJ IDE project directory +.idea/ + # Visual C++ cache files ipch/ *.aps diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..80d09cc --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,34 @@ +# Copyright 2022 Google LLC +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.20.0) +project(fff) + +set(CMAKE_CXX_STANDARD 11) + +# Add the gtest library which will be used below +add_subdirectory(gtest) + +# Enable ctest +enable_testing() + +# Generate fff.h if fakegen.rb changed +add_custom_command( + OUTPUT + ${CMAKE_CURRENT_LIST_DIR}/fff.h + COMMAND + ruby ${CMAKE_CURRENT_LIST_DIR}/fakegen.rb >> ${CMAKE_CURRENT_LIST_DIR}/fff.h + DEPENDS + ${CMAKE_CURRENT_LIST_DIR}/fakegen.rb + ${CMAKE_CURRENT_LIST_DIR}/LICENSE +) +add_custom_target(fff_h DEPENDS ${CMAKE_CURRENT_LIST_DIR}/fff.h) + +# Add an interface library for fff.h +add_library(fff INTERFACE) +add_dependencies(fff fff_h) +target_include_directories(fff INTERFACE ${CMAKE_CURRENT_LIST_DIR}) + +# Add tests and samples +add_subdirectory(test) +add_subdirectory(examples) diff --git a/Makefile b/Makefile deleted file mode 100644 index a774e0b..0000000 --- a/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -all: - mkdir -p build - cd gtest; $(MAKE) all - cd test; $(MAKE) all - cd examples; $(MAKE) all - -clean: - cd gtest; $(MAKE) clean - cd test; $(MAKE) clean - cd examples; $(MAKE) clean diff --git a/README.md b/README.md index a9757fd..3255e6a 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,18 @@ fff is a micro-framework for creating fake C functions for tests. Because life is too short to spend time hand-writing fake functions for testing. +## Running all tests + +### Linux / MacOS +To run all the tests and sample apps, simply call `$ buildandtest`. This script +will call down into CMake with the following: + +```shell +cmake -GNinja -B build +cmake --build build +ctest --test-dir build --output-on-failure +``` + ## Hello Fake World! Say you are testing an embedded user interface and you have a function that diff --git a/buildandtest b/buildandtest index bd9945b..7fef139 100755 --- a/buildandtest +++ b/buildandtest @@ -1,20 +1,15 @@ #!/bin/bash set -e -cat LICENSE > fff.h -echo >> fff.h -ruby fakegen.rb >> fff.h -make clean -make all -build/fff_test_c -build/fff_test_cpp --gtest_output=xml:build/test_results.xml -build/ui_test_ansic -build/ui_test_cpp --gtest_output=xml:build/example_results.xml -build/fff_test_glob_c -build/fff_test_glob_cpp --gtest_output=xml:build/test_global_results.xml -build/driver_testing --gtest_output=xml:build/driver_testing.xml -build/driver_testing_fff --gtest_output=xml:build/driver_testing_fff.xml -build/weak_linking/test_display -build/weak_linking/test_sensor -build/weak_linking/test_main +# Clear the environment +rm -fr build fff.h +mkdir build +# Configure the build +cmake -GNinja -B build || exit -1 + +# Build all targets +cmake --build build || exit -1 + +# Run all tests +ctest --test-dir build --output-on-failure diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000..58a3d09 --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,6 @@ +# Copyright 2022 Google LLC +# SPDX-License-Identifier: Apache-2.0 + +add_subdirectory(driver_testing) +add_subdirectory(embedded_ui) +add_subdirectory(weak_linking) diff --git a/examples/Makefile b/examples/Makefile deleted file mode 100644 index d1671b6..0000000 --- a/examples/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -all: - cd embedded_ui; $(MAKE) all - cd driver_testing; $(MAKE) all - cd weak_linking; $(MAKE) all -clean: - cd embedded_ui; $(MAKE) clean - cd driver_testing; $(MAKE) clean - cd weak_linking; $(MAKE) clean - diff --git a/examples/driver_testing/CMakeLists.txt b/examples/driver_testing/CMakeLists.txt new file mode 100644 index 0000000..e2ad8c9 --- /dev/null +++ b/examples/driver_testing/CMakeLists.txt @@ -0,0 +1,31 @@ +# Copyright 2022 Google LLC +# SPDX-License-Identifier: Apache-2.0 + +# Create the driver test binary +add_executable(driver_test + src/driver.c + src/driver.test.cpp +) +target_include_directories(driver_test PRIVATE include) +target_link_libraries(driver_test PRIVATE gtest fff) +target_compile_definitions(driver_test PUBLIC TEST_USER_OWN_TR1_TUPLE=1 TESTING) + +# Create the driver fff test binary +add_executable(driver_fff_test + src/driver.c + src/driver.test.fff.cpp +) +target_include_directories(driver_fff_test PRIVATE include) +target_link_libraries(driver_fff_test PRIVATE gtest fff) +target_compile_definitions(driver_fff_test PUBLIC TEST_USER_OWN_TR1_TUPLE=1 TESTING) + +# Add tests to ctest +add_test( + NAME driver_test + COMMAND $ +) + +add_test( + NAME driver_fff_test + COMMAND $ +) diff --git a/examples/driver_testing/Makefile b/examples/driver_testing/Makefile deleted file mode 100644 index e32faaf..0000000 --- a/examples/driver_testing/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -$(VERBOSE).SILENT: - -BUILD_DIR = ../../build -TEMPLATE_PROGNAME = $(BUILD_DIR)/template -CPP_PROGNAME_NOFFF = $(BUILD_DIR)/driver_testing -CPP_PROGNAME_FFF = $(BUILD_DIR)/driver_testing_fff -CC = gcc -CC += -c -CPP = g++ -CPP += -c -LD = g++ - -GTEST_OBJS = $(BUILD_DIR)/gtest-all.o $(BUILD_DIR)/gtest-main.o -C_OBJFILES = $(BUILD_DIR)/driver.o -TEMPLATE_OBJFILES = $(BUILD_DIR)/test_suite_template.o -FFF_OBJFILES = $(BUILD_DIR)/driver.test.fff.o $(GTEST_OBJS) -NOFFF_OBJFILES = $(BUILD_DIR)/driver.test.o $(GTEST_OBJS) -CPP_LIBS = -lpthread - - -all: $(CPP_PROGNAME_NOFFF) $(CPP_PROGNAME_FFF) $(TEMPLATE_PROGNAME) - -.PHONY: clean - -clean: - @echo "Cleaning object files" - @echo " rm -f $(BUILD_DIR)/*.o" - rm -f $(BUILD_DIR)/*.o - @echo "Cleaning backups" - @echo " rm -f *~" - rm -f *~ - @echo "Removing programs" - @echo " rm -f $(CPP_PROGNAME_NOFFF) $(CPP_PROGNAME_FFF) $(TEMPLATE_PROGNAME)" - rm -f $(CPP_PROGNAME_NOFFF) $(CPP_PROGNAME_FFF) $(TEMPLATE_PROGNAME) - - -$(BUILD_DIR)/%.o: %.c - @echo "Compiling "$@ - @echo " CC "$< - $(CC) -o $@ $< -DTESTING - -$(BUILD_DIR)/%.o: %.cpp - @echo "Compiling "$@ - @echo " CPP "$< - $(CPP) -DGTEST_USE_OWN_TR1_TUPLE=1 -I../.. -o $@ $< -DTESTING - -$(TEMPLATE_PROGNAME): $(TEMPLATE_OBJFILES) - @echo "Linking "$@ - @echo " LD -o "ctemplate" "$(TEMPLATE_OBJFILES) - $(LD) -o $(TEMPLATE_PROGNAME) $(TEMPLATE_OBJFILES) - -$(CPP_PROGNAME_FFF): $(FFF_OBJFILES) $(C_OBJFILES) - @echo "Linking "$@ - @echo " LD -o "$(CPP_PROGNAME_FFF)" "$(FFF_OBJFILES) - $(LD) -o $(CPP_PROGNAME_FFF) $(FFF_OBJFILES) $(C_OBJFILES) $(CPP_LIBS) - -$(CPP_PROGNAME_NOFFF): $(NOFFF_OBJFILES) $(C_OBJFILES) - @echo "Linking "$@ - @echo " LD -o "$(CPP_PROGNAME_NOFFF)" "$(NOFFF_OBJFILES) - $(LD) -o $(CPP_PROGNAME_NOFFF) $(NOFFF_OBJFILES) $(C_OBJFILES) $(CPP_LIBS) - -nothing: - @echo "Nothing to do; quitting :(" - @echo "HINT: Try make all" diff --git a/examples/driver_testing/driver.h b/examples/driver_testing/include/driver.h similarity index 100% rename from examples/driver_testing/driver.h rename to examples/driver_testing/include/driver.h diff --git a/examples/driver_testing/hardware_abstraction.h b/examples/driver_testing/include/hardware_abstraction.h similarity index 100% rename from examples/driver_testing/hardware_abstraction.h rename to examples/driver_testing/include/hardware_abstraction.h diff --git a/examples/driver_testing/registers.h b/examples/driver_testing/include/registers.h similarity index 100% rename from examples/driver_testing/registers.h rename to examples/driver_testing/include/registers.h diff --git a/examples/driver_testing/driver.c b/examples/driver_testing/src/driver.c similarity index 100% rename from examples/driver_testing/driver.c rename to examples/driver_testing/src/driver.c diff --git a/examples/driver_testing/driver.test.cpp b/examples/driver_testing/src/driver.test.cpp similarity index 97% rename from examples/driver_testing/driver.test.cpp rename to examples/driver_testing/src/driver.test.cpp index 2df0702..cd80bb3 100644 --- a/examples/driver_testing/driver.test.cpp +++ b/examples/driver_testing/src/driver.test.cpp @@ -3,7 +3,7 @@ extern "C" #include "driver.h" #include "registers.h" } -#include "../../fff.h" +#include "../../../fff.h" #include diff --git a/examples/driver_testing/driver.test.fff.cpp b/examples/driver_testing/src/driver.test.fff.cpp similarity index 98% rename from examples/driver_testing/driver.test.fff.cpp rename to examples/driver_testing/src/driver.test.fff.cpp index 3a86648..56f6192 100644 --- a/examples/driver_testing/driver.test.fff.cpp +++ b/examples/driver_testing/src/driver.test.fff.cpp @@ -3,7 +3,7 @@ extern "C"{ #include "registers.h" #include "hardware_abstraction.h" } -#include "../../fff.h" +#include "fff.h" #include DEFINE_FFF_GLOBALS; diff --git a/examples/embedded_ui/CMakeLists.txt b/examples/embedded_ui/CMakeLists.txt new file mode 100644 index 0000000..260e5c7 --- /dev/null +++ b/examples/embedded_ui/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright 2022 Google LLC +# SPDX-License-Identifier: Apache-2.0 + +# Create the ui_test_ansic test binary +add_executable(ui_test_ansic src/UI_test_ansic.c src/UI.c) +target_include_directories(ui_test_ansic PRIVATE include) +target_link_libraries(ui_test_ansic PRIVATE fff) + +# Create the ui_test_cpp test binary +add_executable(ui_test_cpp src/UI_test_cpp.cpp src/UI.c) +target_include_directories(ui_test_cpp PRIVATE include) +target_link_libraries(ui_test_cpp PRIVATE gtest fff) + +# Add tests to ctest +add_test( + NAME ui_test_ansic + COMMAND $ +) + +add_test( + NAME ui_test_cpp + COMMAND $ +) diff --git a/examples/embedded_ui/Makefile b/examples/embedded_ui/Makefile deleted file mode 100644 index 654beec..0000000 --- a/examples/embedded_ui/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -$(VERBOSE).SILENT: - -BUILD_DIR = ../../build -TEMPLATE_PROGNAME = $(BUILD_DIR)/template -C_PROGNAME = $(BUILD_DIR)/ui_test_ansic -CPP_PROGNAME = $(BUILD_DIR)/ui_test_cpp -CC = gcc -CC += -c -CPP = g++ -CPP += -c -LD = g++ - -GTEST_OBJS = $(BUILD_DIR)/gtest-all.o $(BUILD_DIR)/gtest-main.o -C_OBJFILES = $(BUILD_DIR)/UI_test_ansic.o $(BUILD_DIR)/UI.o -TEMPLATE_OBJFILES = $(BUILD_DIR)/test_suite_template.o -CPP_OBJFILES = $(BUILD_DIR)/UI_test_cpp.o $(BUILD_DIR)/UI.o $(GTEST_OBJS) -CPP_LIBS = -lpthread - - -all: $(C_PROGNAME) $(CPP_PROGNAME) $(TEMPLATE_PROGNAME) - -.PHONY: clean - -clean: - @echo "Cleaning object files" - @echo " rm -f $(BUILD_DIR)/*.o" - rm -f $(BUILD_DIR)/*.o - @echo "Cleaning backups" - @echo " rm -f *~" - rm -f *~ - @echo "Removing programs" - @echo " rm -f "$(C_PROGNAME) - rm -f $(C_PROGNAME) - @echo " rm -f "$(CPP_PROGNAME) $(TEMPLATE_PROGNAME) - rm -f $(CPP_PROGNAME) $(TEMPLATE_PROGNAME) - - -$(BUILD_DIR)/%.o: %.c - @echo "Compiling "$@ - @echo " CC "$< - $(CC) -o $@ $< - -$(BUILD_DIR)/%.o: %.cpp - @echo "Compiling "$@ - @echo " CPP "$< - $(CPP) -DGTEST_USE_OWN_TR1_TUPLE=1 -I../.. -o $@ $< - -$(TEMPLATE_PROGNAME): $(TEMPLATE_OBJFILES) - @echo "Linking "$@ - @echo " LD -o "ctemplate" "$(TEMPLATE_OBJFILES) - $(LD) -o $(TEMPLATE_PROGNAME) $(TEMPLATE_OBJFILES) - -$(C_PROGNAME): $(C_OBJFILES) - @echo "Linking "$@ - @echo " LD -o "$(C_PROGNAME)" "$(C_OBJFILES) - $(LD) -o $(C_PROGNAME) $(C_OBJFILES) - -$(CPP_PROGNAME): $(CPP_OBJFILES) $(C_OBJFILES) - @echo "Linking "$@ - @echo " LD -o "$(CPP_PROGNAME)" "$(CPP_OBJFILES) - $(LD) -o $(CPP_PROGNAME) $(CPP_OBJFILES) $(CPP_LIBS) - - - -nothing: - @echo "Nothing to do; quitting :(" - @echo "HINT: Try make all" diff --git a/examples/embedded_ui/DISPLAY.h b/examples/embedded_ui/include/DISPLAY.h similarity index 100% rename from examples/embedded_ui/DISPLAY.h rename to examples/embedded_ui/include/DISPLAY.h diff --git a/examples/embedded_ui/SYSTEM.h b/examples/embedded_ui/include/SYSTEM.h similarity index 100% rename from examples/embedded_ui/SYSTEM.h rename to examples/embedded_ui/include/SYSTEM.h diff --git a/examples/embedded_ui/UI.h b/examples/embedded_ui/include/UI.h similarity index 100% rename from examples/embedded_ui/UI.h rename to examples/embedded_ui/include/UI.h diff --git a/examples/embedded_ui/UI.c b/examples/embedded_ui/src/UI.c similarity index 100% rename from examples/embedded_ui/UI.c rename to examples/embedded_ui/src/UI.c diff --git a/examples/embedded_ui/UI_test_ansic.c b/examples/embedded_ui/src/UI_test_ansic.c similarity index 99% rename from examples/embedded_ui/UI_test_ansic.c rename to examples/embedded_ui/src/UI_test_ansic.c index f98e409..3e3fce9 100644 --- a/examples/embedded_ui/UI_test_ansic.c +++ b/examples/embedded_ui/src/UI_test_ansic.c @@ -1,5 +1,5 @@ #include "UI.h" -#include "../../fff.h" +#include "fff.h" #include "SYSTEM.h" #include "DISPLAY.h" diff --git a/examples/embedded_ui/UI_test_cpp.cpp b/examples/embedded_ui/src/UI_test_cpp.cpp similarity index 99% rename from examples/embedded_ui/UI_test_cpp.cpp rename to examples/embedded_ui/src/UI_test_cpp.cpp index ecd9def..e7d9bba 100644 --- a/examples/embedded_ui/UI_test_cpp.cpp +++ b/examples/embedded_ui/src/UI_test_cpp.cpp @@ -6,7 +6,7 @@ extern "C"{ #include -#include "../../fff.h" +#include "fff.h" DEFINE_FFF_GLOBALS; /* SYSTEM.h */ diff --git a/examples/embedded_ui/test_suite_template.c b/examples/embedded_ui/test_suite_template.c deleted file mode 100644 index 00df5bb..0000000 --- a/examples/embedded_ui/test_suite_template.c +++ /dev/null @@ -1,34 +0,0 @@ -#include "../../test/c_test_framework.h" - -/* Initialializers called for every test */ -void setup() -{ - -} - -/* Tests go here */ -TEST_F(GreeterTests, hello_world) -{ - assert(1 == 0); -} - - - -int main() -{ - setbuf(stderr, NULL); - fprintf(stdout, "-------------\n"); - fprintf(stdout, "Running Tests\n"); - fprintf(stdout, "-------------\n\n"); - fflush(0); - - /* Run tests */ - RUN_TEST(GreeterTests, hello_world); - - - printf("\n-------------\n"); - printf("Complete\n"); - printf("-------------\n\n"); - - return 0; -} diff --git a/examples/weak_linking/CMakeLists.txt b/examples/weak_linking/CMakeLists.txt new file mode 100644 index 0000000..b1d5679 --- /dev/null +++ b/examples/weak_linking/CMakeLists.txt @@ -0,0 +1,54 @@ +# Copyright 2022 Google LLC +# SPDX-License-Identifier: Apache-2.0 + +# Skip these tests for Windows +if(WIN32) + message(STATUS "Weak linking requires __attribute__((weak)) which isn't supported on MS VS, skipping tests") + return() +endif() + +# Set the global FFF_GCC_FUNCTION_ATTRIBUTES for config.h +set(FFF_GCC_FUNCTION_ATTRIBUTES "__attribute__((weak))") +configure_file(config/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) + +# Create a libfakes static library that will be used in the executables below. +# This library will depend on the above generated config.h which will add the +# FFF 'weak' function attributes. +add_library(libfakes STATIC + test/src/bus.fake.c + test/src/display.fake.c + test/src/error.fake.c + test/src/sensor.fake.c + test/src/test_common.c +) +target_precompile_headers(libfakes PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/config.h) +target_include_directories(libfakes PUBLIC include test/include) +target_link_libraries(libfakes PUBLIC fff) + +# Create the main test binary +add_executable(test_main src/main.c test/src/main.test.c) +target_link_libraries(test_main PRIVATE libfakes) + +# Create the sensor test binary +add_executable(test_sensor src/sensor.c test/src/sensor.test.c) +target_link_libraries(test_sensor PRIVATE libfakes) + +# Create the display test binary +add_executable(test_display src/display.c test/src/display.test.c ${LIBFAKES_SRCS}) +target_link_libraries(test_display PRIVATE libfakes) + +# Add tests to ctest +add_test( + NAME test_main + COMMAND $ +) + +add_test( + NAME test_sensor + COMMAND $ +) + +add_test( + NAME test_display + COMMAND $ +) diff --git a/examples/weak_linking/Makefile b/examples/weak_linking/Makefile deleted file mode 100644 index 0387740..0000000 --- a/examples/weak_linking/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -BUILD_DIR = ../../build -INCLUDE_DIRS = -I "../../" -I "./src/" - -BUILD_DIR_FAKE = $(BUILD_DIR)/weak_linking -CC = gcc -WEAK_FLAGS=-Wall -DFFF_GCC_FUNCTION_ATTRIBUTES="__attribute__((weak))" - -$(BUILD_DIR_FAKE)/%.o: test/%.c - @echo "Compiling "$@ - $(CC) $(WEAK_FLAGS) $(INCLUDE_DIRS) -g -O0 -c $< -o $@ - -FAKE_OBJECTS = $(BUILD_DIR_FAKE)/display.fake.o $(BUILD_DIR_FAKE)/sensor.fake.o $(BUILD_DIR_FAKE)/sensor.fake.o $(BUILD_DIR_FAKE)/error.fake.o $(BUILD_DIR_FAKE)/bus.fake.o $(BUILD_DIR_FAKE)/test_common.o - -TEST_BINARIES = $(BUILD_DIR_FAKE)/test_main $(BUILD_DIR_FAKE)/test_display $(BUILD_DIR_FAKE)/test_sensor -mkdir: - mkdir -p $(BUILD_DIR_FAKE)/ - -clean: - rm -rf $(BUILD_DIR_FAKE)/ - -$(BUILD_DIR_FAKE)/libfakes.a: $(FAKE_OBJECTS) - ar r $@ $^ - -# First case where we need __weak__ linking: -# - If we have the build objects (for some reason) in order where the fake object comes first. -$(BUILD_DIR_FAKE)/test_display: ./test/display.test.c $(BUILD_DIR_FAKE)/libfakes.a ./src/display.c - $(CC) $(WEAK_FLAGS) $(INCLUDE_DIRS) -o $@ $^ - -# Second case where we need weak linking: -# - If we use an object from the fake object -> gcc linker will include it. -$(BUILD_DIR_FAKE)/test_sensor: ./test/sensor.test.c ./src/sensor.c $(BUILD_DIR_FAKE)/libfakes.a - $(CC) $(WEAK_FLAGS) $(INCLUDE_DIRS) -o $@ $^ - -# Third case where we need weak linking: -# - We want to fake one function but not all. -$(BUILD_DIR_FAKE)/test_main: ./test/main.test.c ./src/main.c $(BUILD_DIR_FAKE)/libfakes.a - $(CC) $(WEAK_FLAGS) $(INCLUDE_DIRS) -o $@ $^ - -all: mkdir $(TEST_BINARIES) diff --git a/examples/weak_linking/config/config.h.in b/examples/weak_linking/config/config.h.in new file mode 100644 index 0000000..30121ce --- /dev/null +++ b/examples/weak_linking/config/config.h.in @@ -0,0 +1,5 @@ +/* Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +#cmakedefine FFF_GCC_FUNCTION_ATTRIBUTES @FFF_GCC_FUNCTION_ATTRIBUTES@ diff --git a/examples/weak_linking/src/bus.h b/examples/weak_linking/include/bus.h similarity index 100% rename from examples/weak_linking/src/bus.h rename to examples/weak_linking/include/bus.h diff --git a/examples/weak_linking/src/display.h b/examples/weak_linking/include/display.h similarity index 100% rename from examples/weak_linking/src/display.h rename to examples/weak_linking/include/display.h diff --git a/examples/weak_linking/src/error.h b/examples/weak_linking/include/error.h similarity index 100% rename from examples/weak_linking/src/error.h rename to examples/weak_linking/include/error.h diff --git a/examples/weak_linking/src/sensor.h b/examples/weak_linking/include/sensor.h similarity index 100% rename from examples/weak_linking/src/sensor.h rename to examples/weak_linking/include/sensor.h diff --git a/examples/weak_linking/test/bus.fake.h b/examples/weak_linking/test/include/bus.fake.h similarity index 100% rename from examples/weak_linking/test/bus.fake.h rename to examples/weak_linking/test/include/bus.fake.h diff --git a/examples/weak_linking/test/display.fake.h b/examples/weak_linking/test/include/display.fake.h similarity index 100% rename from examples/weak_linking/test/display.fake.h rename to examples/weak_linking/test/include/display.fake.h diff --git a/examples/weak_linking/test/error.fake.h b/examples/weak_linking/test/include/error.fake.h similarity index 100% rename from examples/weak_linking/test/error.fake.h rename to examples/weak_linking/test/include/error.fake.h diff --git a/examples/weak_linking/test/sensor.fake.h b/examples/weak_linking/test/include/sensor.fake.h similarity index 100% rename from examples/weak_linking/test/sensor.fake.h rename to examples/weak_linking/test/include/sensor.fake.h diff --git a/examples/weak_linking/test/test_common.h b/examples/weak_linking/test/include/test_common.h similarity index 100% rename from examples/weak_linking/test/test_common.h rename to examples/weak_linking/test/include/test_common.h diff --git a/examples/weak_linking/test/bus.fake.c b/examples/weak_linking/test/src/bus.fake.c similarity index 100% rename from examples/weak_linking/test/bus.fake.c rename to examples/weak_linking/test/src/bus.fake.c diff --git a/examples/weak_linking/test/display.fake.c b/examples/weak_linking/test/src/display.fake.c similarity index 100% rename from examples/weak_linking/test/display.fake.c rename to examples/weak_linking/test/src/display.fake.c diff --git a/examples/weak_linking/test/display.test.c b/examples/weak_linking/test/src/display.test.c similarity index 100% rename from examples/weak_linking/test/display.test.c rename to examples/weak_linking/test/src/display.test.c diff --git a/examples/weak_linking/test/error.fake.c b/examples/weak_linking/test/src/error.fake.c similarity index 100% rename from examples/weak_linking/test/error.fake.c rename to examples/weak_linking/test/src/error.fake.c diff --git a/examples/weak_linking/test/main.test.c b/examples/weak_linking/test/src/main.test.c similarity index 100% rename from examples/weak_linking/test/main.test.c rename to examples/weak_linking/test/src/main.test.c diff --git a/examples/weak_linking/test/sensor.fake.c b/examples/weak_linking/test/src/sensor.fake.c similarity index 100% rename from examples/weak_linking/test/sensor.fake.c rename to examples/weak_linking/test/src/sensor.fake.c diff --git a/examples/weak_linking/test/sensor.test.c b/examples/weak_linking/test/src/sensor.test.c similarity index 100% rename from examples/weak_linking/test/sensor.test.c rename to examples/weak_linking/test/src/sensor.test.c diff --git a/examples/weak_linking/test/test_common.c b/examples/weak_linking/test/src/test_common.c similarity index 98% rename from examples/weak_linking/test/test_common.c rename to examples/weak_linking/test/src/test_common.c index 6f35a72..58c3b44 100644 --- a/examples/weak_linking/test/test_common.c +++ b/examples/weak_linking/test/src/test_common.c @@ -22,12 +22,12 @@ void init_tests() { memset( GLOBAL_TEST_bus_read_ret, 0x00, sizeof(GLOBAL_TEST_bus_read_ret)); FFF_RESET_HISTORY(); - + RESET_FAKE(bus_read_write); RESET_FAKE(bus_write); RESET_FAKE(runtime_error); - + runtime_error_fake.custom_fake = spoof_runtime_error; bus_read_write_fake.custom_fake = spoof_bus_read_write; bus_write_fake.return_val = true; -} +} \ No newline at end of file diff --git a/fakegen.rb b/fakegen.rb index 075c8f7..d937bd3 100644 --- a/fakegen.rb +++ b/fakegen.rb @@ -8,6 +8,10 @@ $DEFAULT_ARG_HISTORY = 50 $MAX_CALL_HISTORY = 50 +def license + File.foreach("#{__dir__}/LICENSE") { |line| putd line } +end + def include_dependencies putd "#include " putd "#include /* For memset and memcpy */" @@ -636,6 +640,7 @@ def output_macro_counting_shortcuts(has_calling_conventions) end def output_c_and_cpp(has_calling_conventions) + license include_guard { include_dependencies output_constants diff --git a/gtest/CMakeLists.txt b/gtest/CMakeLists.txt new file mode 100644 index 0000000..c223ef6 --- /dev/null +++ b/gtest/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright 2022 Google LLC +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.20.0) + +find_package(Threads REQUIRED) +set(CMAKE_EXE_LINKER_FLAGS " -static") + +# Create the gtest library +add_library(gtest src/gtest-all.cc src/gtest-main.cc) +target_include_directories(gtest PUBLIC include include/gtest) +target_link_libraries(gtest PRIVATE Threads::Threads -static-libstdc++) diff --git a/gtest/Makefile b/gtest/Makefile deleted file mode 100644 index efcfa0b..0000000 --- a/gtest/Makefile +++ /dev/null @@ -1,22 +0,0 @@ - -BUILD_DIR = ../build -LIBS := -lpthread -CPP_OBJS=$(BUILD_DIR)/gtest-all.o $(BUILD_DIR)/gtest-main.o - -SOURCES=gtest-all.cc gtest-main.cc - - -# Each subdirectory must supply rules for building sources it contributes -$(BUILD_DIR)/%.o: %.cc - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -I../ -O0 -g3 -Wall -DGTEST_USE_OWN_TR1_TUPLE=1 -c -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - -all: $(CPP_OBJS) - -clean: - -$(RM) $(CPP_OBJS) - -@echo ' ' - diff --git a/gtest/gtest.h b/gtest/include/gtest/gtest.h similarity index 99% rename from gtest/gtest.h rename to gtest/include/gtest/gtest.h index 3143bd6..0968460 100644 --- a/gtest/gtest.h +++ b/gtest/include/gtest/gtest.h @@ -1554,11 +1554,29 @@ inline bool operator!=(const GTEST_10_TUPLE_(T)& t, // . Hence the following #define is a hack to prevent // from being included. # define _TR1_FUNCTIONAL 1 -# include +# include +namespace std { + namespace tr1 { + using ::std::get; + using ::std::make_tuple; + using ::std::tuple; + using ::std::tuple_element; + using ::std::tuple_size; + } +} # undef _TR1_FUNCTIONAL // Allows the user to #include // if he chooses to. # else -# include // NOLINT +# include // NOLINT +namespace std { + namespace tr1 { + using ::std::get; + using ::std::make_tuple; + using ::std::tuple; + using ::std::tuple_element; + using ::std::tuple_size; + } +} # endif // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302 # else diff --git a/gtest/gtest-all.cc b/gtest/src/gtest-all.cc similarity index 100% rename from gtest/gtest-all.cc rename to gtest/src/gtest-all.cc diff --git a/gtest/gtest-main.cc b/gtest/src/gtest-main.cc similarity index 100% rename from gtest/gtest-main.cc rename to gtest/src/gtest-main.cc diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..0aa6679 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,56 @@ +# Copyright 2022 Google LLC +# SPDX-License-Identifier: Apache-2.0 + +# Create a list of common files needed for tests +set( + COMMON_FILE_LIST + c_test_framework.h + test_cases.include +) + +# Create the C test executable +add_executable(c_test fff_test_c.c ${COMMON_FILE_LIST}) +target_link_libraries(c_test PRIVATE fff) + +# Create the C++ test executable +add_executable(cpp_test fff_test_cpp.cpp ${COMMON_FILE_LIST}) +target_link_libraries(cpp_test PRIVATE gtest fff) + +# Create the C global test executable +add_executable(c_global_test + fff_test_global_c.c + global_fakes.c + global_fakes.h + ${COMMON_FILE_LIST} +) +target_link_libraries(c_global_test PRIVATE fff) + +# Create the C++ global test executable +add_executable(cpp_global_test + fff_test_global_cpp.cpp + global_fakes.c + global_fakes.h + ${COMMON_FILE_LIST} +) +target_link_libraries(cpp_global_test PRIVATE gtest fff) + +# Add the tests for ctest +add_test( + NAME c_test + COMMAND $ +) + +add_test( + NAME cpp_test + COMMAND $ +) + +add_test( + NAME c_global_test + COMMAND $ +) + +add_test( + NAME cpp_global_test + COMMAND $ +) \ No newline at end of file diff --git a/test/Makefile b/test/Makefile deleted file mode 100644 index 3368be0..0000000 --- a/test/Makefile +++ /dev/null @@ -1,81 +0,0 @@ - -BUILD_DIR = ../build - -FFF_TEST_CPP_OBJS += \ -$(BUILD_DIR)/fff_test_cpp.o \ -$(BUILD_DIR)/gtest-all.o \ -$(BUILD_DIR)/gtest-main.o - -FFF_TEST_GLOBAL_CPP_OBJS += \ -$(BUILD_DIR)/fff_test_global_cpp.o \ -$(BUILD_DIR)/global_fakes.o \ -$(BUILD_DIR)/gtest-all.o \ -$(BUILD_DIR)/gtest-main.o - -FFF_TEST_C_OBJS = $(BUILD_DIR)/fff_test_c.o - -FFF_TEST_GLOBAL_C_OBJS += \ -$(BUILD_DIR)/global_fakes.o \ -$(BUILD_DIR)/fff_test_global_c.o - -FFF_TEST_CPP_TARGET = $(BUILD_DIR)/fff_test_cpp -FFF_TEST_C_TARGET = $(BUILD_DIR)/fff_test_c -FFF_TEST_GLOBAL_C_TARGET = $(BUILD_DIR)/fff_test_glob_c -FFF_TEST_GLOBAL_CPP_TARGET = $(BUILD_DIR)/fff_test_glob_cpp - -LIBS := -lpthread -# All Target -all: $(FFF_TEST_CPP_TARGET) $(FFF_TEST_C_TARGET) $(FFF_TEST_GLOBAL_C_TARGET) $(FFF_TEST_GLOBAL_CPP_TARGET) - - -# Each subdirectory must supply rules for building sources it contributes -$(BUILD_DIR)/%.o: %.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - g++ -I../ -O0 -g3 -Wall -DGTEST_USE_OWN_TR1_TUPLE=1 -c -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - -$(BUILD_DIR)/%.o: %.c - @echo 'Building file: $<' - @echo 'Invoking: GCC C Compiler' - gcc -I../ -O0 -g3 -Wall -std=c99 -c -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - -# Link targets -$(FFF_TEST_CPP_TARGET): $(FFF_TEST_CPP_OBJS) - @echo 'Building target: $@' - @echo 'Invoking: GCC C++ Linker' - g++ -o "$(FFF_TEST_CPP_TARGET)" $(FFF_TEST_CPP_OBJS) $(LIBS) - @echo 'Finished building target: $@' - @echo ' ' - -$(FFF_TEST_C_TARGET): $(FFF_TEST_C_OBJS) - @echo 'Building target: $@' - @echo 'Invoking: GCC C Linker' - gcc -o "$(FFF_TEST_C_TARGET)" $(FFF_TEST_C_OBJS) $(LIBS) - @echo 'Finished building target: $@' - @echo ' ' - -$(FFF_TEST_GLOBAL_C_TARGET): $(FFF_TEST_GLOBAL_C_OBJS) - @echo 'Building target: $@' - @echo 'Invoking: GCC C++ Linker' - gcc -o "$(FFF_TEST_GLOBAL_C_TARGET)" $(FFF_TEST_GLOBAL_C_OBJS) $(LIBS) $(WRAP_LDFLAGS) - @echo 'Finished building target: $@' - @echo ' ' - -$(FFF_TEST_GLOBAL_CPP_TARGET): $(FFF_TEST_GLOBAL_CPP_OBJS) - @echo 'Building target: $@' - @echo 'Invoking: GCC C++ Linker' - g++ -o "$(FFF_TEST_GLOBAL_CPP_TARGET)" $(FFF_TEST_GLOBAL_CPP_OBJS) $(LIBS) - @echo 'Finished building target: $@' - @echo ' ' - -# Other Targets -clean: - -$(RM) $(FFF_TEST_CPP_OBJS) $(FFF_TEST_GLOBAL_C_OBJS) $(FFF_TEST_C_OBJS) \ - $(FFF_TEST_CPP_TARGET) $(FFF_TEST_C_TARGET) $(FFF_TEST_GLOBAL_CPP_TARGET) $(FFF_TEST_GLOBAL_C_TARGET) - -@echo ' ' - diff --git a/test/fff_test_c.c b/test/fff_test_c.c index 8f7af90..398a4b5 100644 --- a/test/fff_test_c.c +++ b/test/fff_test_c.c @@ -6,7 +6,7 @@ #define OVERRIDE_CALL_HIST_LEN 17u #define FFF_CALL_HISTORY_LEN OVERRIDE_CALL_HIST_LEN -#include "../fff.h" +#include "fff.h" #include "c_test_framework.h" #include diff --git a/test/fff_test_cpp.cpp b/test/fff_test_cpp.cpp index f349177..b387ae2 100644 --- a/test/fff_test_cpp.cpp +++ b/test/fff_test_cpp.cpp @@ -12,7 +12,7 @@ #define OVERRIDE_CALL_HIST_LEN 17u #define FFF_CALL_HISTORY_LEN OVERRIDE_CALL_HIST_LEN -#include "../fff.h" +#include "fff.h" #include DEFINE_FFF_GLOBALS diff --git a/test/global_fakes.h b/test/global_fakes.h index 1c0e44a..0530dd2 100644 --- a/test/global_fakes.h +++ b/test/global_fakes.h @@ -1,7 +1,7 @@ #ifndef GLOBAL_FAKES_H_ #define GLOBAL_FAKES_H_ -#include "../fff.h" +#include "fff.h" #include "string.h" diff --git a/test/ms_vc_fff_test/fff/fff.vcxproj b/test/ms_vc_fff_test/fff/fff.vcxproj deleted file mode 100644 index b0d7f45..0000000 --- a/test/ms_vc_fff_test/fff/fff.vcxproj +++ /dev/null @@ -1,140 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {CDBC5A3A-59B8-4638-B818-935395302DAF} - fff2 - 10.0.17763.0 - fff - - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - - - Level3 - Disabled - true - true - - - del $(SolutionDir)..\..\fff.h -ruby.exe $(SolutionDir)..\..\fakegen.rb -wcc > $(SolutionDir)..\..\fff.h - - - - - Level3 - Disabled - true - true - - - del $(SolutionDir)..\..\fff.h -ruby.exe $(SolutionDir)..\..\fakegen.rb -wcc > $(SolutionDir)..\..\fff.h - - - - - Level3 - MaxSpeed - true - true - true - true - - - true - true - - - del $(SolutionDir)..\..\fff.h -ruby.exe $(SolutionDir)..\..\fakegen.rb -wcc > $(SolutionDir)..\..\fff.h - - - - - Level3 - MaxSpeed - true - true - true - true - - - true - true - - - del $(SolutionDir)..\..\fff.h -ruby.exe $(SolutionDir)..\..\fakegen.rb -wcc > $(SolutionDir)..\..\fff.h - - - - - - - - - \ No newline at end of file diff --git a/test/ms_vc_fff_test/fff/fff.vcxproj.filters b/test/ms_vc_fff_test/fff/fff.vcxproj.filters deleted file mode 100644 index 9de4a18..0000000 --- a/test/ms_vc_fff_test/fff/fff.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - \ No newline at end of file diff --git a/test/ms_vc_fff_test/gtest/gtest.vcxproj b/test/ms_vc_fff_test/gtest/gtest.vcxproj deleted file mode 100644 index 93565d6..0000000 --- a/test/ms_vc_fff_test/gtest/gtest.vcxproj +++ /dev/null @@ -1,163 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {792FDC07-43A6-42BB-ABD5-18BA1A8B17E7} - Win32Proj - gtest - 10.0.17763.0 - - - - StaticLibrary - true - v141 - Unicode - - - StaticLibrary - false - v141 - true - Unicode - - - StaticLibrary - true - v141 - Unicode - - - StaticLibrary - false - v141 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath) - - - true - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath) - - - false - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath) - - - false - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath) - - - - NotUsing - Level3 - Disabled - true - _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - - - Windows - true - - - - - NotUsing - Level3 - Disabled - true - _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - - - Windows - true - - - - - NotUsing - Level3 - MaxSpeed - true - true - true - _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - - - Windows - true - true - true - - - - - NotUsing - Level3 - MaxSpeed - true - true - true - _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - - - Windows - true - true - true - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/ms_vc_fff_test/gtest/gtest.vcxproj.filters b/test/ms_vc_fff_test/gtest/gtest.vcxproj.filters deleted file mode 100644 index 042c6b8..0000000 --- a/test/ms_vc_fff_test/gtest/gtest.vcxproj.filters +++ /dev/null @@ -1,30 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/test/ms_vc_fff_test/ms_vc_fff_test.sln b/test/ms_vc_fff_test/ms_vc_fff_test.sln deleted file mode 100644 index b55f3c8..0000000 --- a/test/ms_vc_fff_test/ms_vc_fff_test.sln +++ /dev/null @@ -1,93 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28010.2036 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ms_vc_fff_test_c", "ms_vc_fff_test_c\ms_vc_fff_test_c.vcxproj", "{B7658726-71D3-48B3-8BD2-6D383A60DC8E}" - ProjectSection(ProjectDependencies) = postProject - {CDBC5A3A-59B8-4638-B818-935395302DAF} = {CDBC5A3A-59B8-4638-B818-935395302DAF} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest", "gtest\gtest.vcxproj", "{792FDC07-43A6-42BB-ABD5-18BA1A8B17E7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ms_vc_fff_test_cpp", "ms_vc_fff_test_cpp\ms_vc_fff_test_cpp.vcxproj", "{00EE1499-1C86-4F7B-8A00-9EBE696D0142}" - ProjectSection(ProjectDependencies) = postProject - {CDBC5A3A-59B8-4638-B818-935395302DAF} = {CDBC5A3A-59B8-4638-B818-935395302DAF} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ms_vc_fff_test_global_cpp", "ms_vc_fff_test_global_cpp\ms_vc_fff_test_global_cpp.vcxproj", "{4384428B-E0FE-404D-A6EB-8CD9A3C88E5C}" - ProjectSection(ProjectDependencies) = postProject - {CDBC5A3A-59B8-4638-B818-935395302DAF} = {CDBC5A3A-59B8-4638-B818-935395302DAF} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ms_vc_fff_test_global_c", "ms_vc_fff_test_global_c\ms_vc_fff_test_global_c.vcxproj", "{0F70375A-2C80-4B07-9EA0-A64E9679B0C7}" - ProjectSection(ProjectDependencies) = postProject - {CDBC5A3A-59B8-4638-B818-935395302DAF} = {CDBC5A3A-59B8-4638-B818-935395302DAF} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fff", "fff\fff.vcxproj", "{CDBC5A3A-59B8-4638-B818-935395302DAF}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B7658726-71D3-48B3-8BD2-6D383A60DC8E}.Debug|x64.ActiveCfg = Debug|x64 - {B7658726-71D3-48B3-8BD2-6D383A60DC8E}.Debug|x64.Build.0 = Debug|x64 - {B7658726-71D3-48B3-8BD2-6D383A60DC8E}.Debug|x86.ActiveCfg = Debug|Win32 - {B7658726-71D3-48B3-8BD2-6D383A60DC8E}.Debug|x86.Build.0 = Debug|Win32 - {B7658726-71D3-48B3-8BD2-6D383A60DC8E}.Release|x64.ActiveCfg = Release|x64 - {B7658726-71D3-48B3-8BD2-6D383A60DC8E}.Release|x64.Build.0 = Release|x64 - {B7658726-71D3-48B3-8BD2-6D383A60DC8E}.Release|x86.ActiveCfg = Release|Win32 - {B7658726-71D3-48B3-8BD2-6D383A60DC8E}.Release|x86.Build.0 = Release|Win32 - {792FDC07-43A6-42BB-ABD5-18BA1A8B17E7}.Debug|x64.ActiveCfg = Debug|x64 - {792FDC07-43A6-42BB-ABD5-18BA1A8B17E7}.Debug|x64.Build.0 = Debug|x64 - {792FDC07-43A6-42BB-ABD5-18BA1A8B17E7}.Debug|x86.ActiveCfg = Debug|Win32 - {792FDC07-43A6-42BB-ABD5-18BA1A8B17E7}.Debug|x86.Build.0 = Debug|Win32 - {792FDC07-43A6-42BB-ABD5-18BA1A8B17E7}.Release|x64.ActiveCfg = Release|x64 - {792FDC07-43A6-42BB-ABD5-18BA1A8B17E7}.Release|x64.Build.0 = Release|x64 - {792FDC07-43A6-42BB-ABD5-18BA1A8B17E7}.Release|x86.ActiveCfg = Release|Win32 - {792FDC07-43A6-42BB-ABD5-18BA1A8B17E7}.Release|x86.Build.0 = Release|Win32 - {00EE1499-1C86-4F7B-8A00-9EBE696D0142}.Debug|x64.ActiveCfg = Debug|x64 - {00EE1499-1C86-4F7B-8A00-9EBE696D0142}.Debug|x64.Build.0 = Debug|x64 - {00EE1499-1C86-4F7B-8A00-9EBE696D0142}.Debug|x86.ActiveCfg = Debug|Win32 - {00EE1499-1C86-4F7B-8A00-9EBE696D0142}.Debug|x86.Build.0 = Debug|Win32 - {00EE1499-1C86-4F7B-8A00-9EBE696D0142}.Release|x64.ActiveCfg = Release|x64 - {00EE1499-1C86-4F7B-8A00-9EBE696D0142}.Release|x64.Build.0 = Release|x64 - {00EE1499-1C86-4F7B-8A00-9EBE696D0142}.Release|x86.ActiveCfg = Release|Win32 - {00EE1499-1C86-4F7B-8A00-9EBE696D0142}.Release|x86.Build.0 = Release|Win32 - {4384428B-E0FE-404D-A6EB-8CD9A3C88E5C}.Debug|x64.ActiveCfg = Debug|x64 - {4384428B-E0FE-404D-A6EB-8CD9A3C88E5C}.Debug|x64.Build.0 = Debug|x64 - {4384428B-E0FE-404D-A6EB-8CD9A3C88E5C}.Debug|x86.ActiveCfg = Debug|Win32 - {4384428B-E0FE-404D-A6EB-8CD9A3C88E5C}.Debug|x86.Build.0 = Debug|Win32 - {4384428B-E0FE-404D-A6EB-8CD9A3C88E5C}.Release|x64.ActiveCfg = Release|x64 - {4384428B-E0FE-404D-A6EB-8CD9A3C88E5C}.Release|x64.Build.0 = Release|x64 - {4384428B-E0FE-404D-A6EB-8CD9A3C88E5C}.Release|x86.ActiveCfg = Release|Win32 - {4384428B-E0FE-404D-A6EB-8CD9A3C88E5C}.Release|x86.Build.0 = Release|Win32 - {0F70375A-2C80-4B07-9EA0-A64E9679B0C7}.Debug|x64.ActiveCfg = Debug|x64 - {0F70375A-2C80-4B07-9EA0-A64E9679B0C7}.Debug|x64.Build.0 = Debug|x64 - {0F70375A-2C80-4B07-9EA0-A64E9679B0C7}.Debug|x86.ActiveCfg = Debug|Win32 - {0F70375A-2C80-4B07-9EA0-A64E9679B0C7}.Debug|x86.Build.0 = Debug|Win32 - {0F70375A-2C80-4B07-9EA0-A64E9679B0C7}.Release|x64.ActiveCfg = Release|x64 - {0F70375A-2C80-4B07-9EA0-A64E9679B0C7}.Release|x64.Build.0 = Release|x64 - {0F70375A-2C80-4B07-9EA0-A64E9679B0C7}.Release|x86.ActiveCfg = Release|Win32 - {0F70375A-2C80-4B07-9EA0-A64E9679B0C7}.Release|x86.Build.0 = Release|Win32 - {CDBC5A3A-59B8-4638-B818-935395302DAF}.Debug|x64.ActiveCfg = Debug|x64 - {CDBC5A3A-59B8-4638-B818-935395302DAF}.Debug|x64.Build.0 = Debug|x64 - {CDBC5A3A-59B8-4638-B818-935395302DAF}.Debug|x86.ActiveCfg = Debug|Win32 - {CDBC5A3A-59B8-4638-B818-935395302DAF}.Debug|x86.Build.0 = Debug|Win32 - {CDBC5A3A-59B8-4638-B818-935395302DAF}.Release|x64.ActiveCfg = Release|x64 - {CDBC5A3A-59B8-4638-B818-935395302DAF}.Release|x64.Build.0 = Release|x64 - {CDBC5A3A-59B8-4638-B818-935395302DAF}.Release|x86.ActiveCfg = Release|Win32 - {CDBC5A3A-59B8-4638-B818-935395302DAF}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {9DEDA619-1153-4BD1-B292-069D4954391E} - EndGlobalSection -EndGlobal diff --git a/test/ms_vc_fff_test/ms_vc_fff_test_c/ms_vc_fff_test_c.vcxproj b/test/ms_vc_fff_test/ms_vc_fff_test_c/ms_vc_fff_test_c.vcxproj deleted file mode 100644 index eb66fe3..0000000 --- a/test/ms_vc_fff_test/ms_vc_fff_test_c/ms_vc_fff_test_c.vcxproj +++ /dev/null @@ -1,150 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - ClCompile - - - 15.0 - {B7658726-71D3-48B3-8BD2-6D383A60DC8E} - msvcffftest - 10.0.17763.0 - ms_vc_fff_test_c - - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath) - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath) - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath) - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath) - - - - Level3 - Disabled - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;._MBCS;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - - - - - Level3 - Disabled - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;._MBCS;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - - - - - Level3 - MaxSpeed - true - true - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;._MBCS;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - - - true - true - - - - - Level3 - MaxSpeed - true - true - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;._MBCS;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - - - true - true - - - - - - diff --git a/test/ms_vc_fff_test/ms_vc_fff_test_c/ms_vc_fff_test_c.vcxproj.filters b/test/ms_vc_fff_test/ms_vc_fff_test_c/ms_vc_fff_test_c.vcxproj.filters deleted file mode 100644 index 8d3e60a..0000000 --- a/test/ms_vc_fff_test/ms_vc_fff_test_c/ms_vc_fff_test_c.vcxproj.filters +++ /dev/null @@ -1,30 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/test/ms_vc_fff_test/ms_vc_fff_test_cpp/ms_vc_fff_test_cpp.vcxproj b/test/ms_vc_fff_test/ms_vc_fff_test_cpp/ms_vc_fff_test_cpp.vcxproj deleted file mode 100644 index 3fe3834..0000000 --- a/test/ms_vc_fff_test/ms_vc_fff_test_cpp/ms_vc_fff_test_cpp.vcxproj +++ /dev/null @@ -1,154 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - ClCompile - - - 15.0 - {00EE1499-1C86-4F7B-8A00-9EBE696D0142} - msvcffftestcpp - 10.0.17763.0 - - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - - Level3 - Disabled - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - - - - - Level3 - Disabled - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - - - - - Level3 - MaxSpeed - true - true - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - - - true - true - - - - - Level3 - MaxSpeed - true - true - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - - - true - true - - - - - - - - - {792fdc07-43a6-42bb-abd5-18ba1a8b17e7} - - - - - - - - - diff --git a/test/ms_vc_fff_test/ms_vc_fff_test_cpp/ms_vc_fff_test_cpp.vcxproj.filters b/test/ms_vc_fff_test/ms_vc_fff_test_cpp/ms_vc_fff_test_cpp.vcxproj.filters deleted file mode 100644 index 510fbb2..0000000 --- a/test/ms_vc_fff_test/ms_vc_fff_test_cpp/ms_vc_fff_test_cpp.vcxproj.filters +++ /dev/null @@ -1,30 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/test/ms_vc_fff_test/ms_vc_fff_test_global_c/ms_vc_fff_test_global_c.vcxproj b/test/ms_vc_fff_test/ms_vc_fff_test_global_c/ms_vc_fff_test_global_c.vcxproj deleted file mode 100644 index 0a433a2..0000000 --- a/test/ms_vc_fff_test/ms_vc_fff_test_global_c/ms_vc_fff_test_global_c.vcxproj +++ /dev/null @@ -1,147 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {0F70375A-2C80-4B07-9EA0-A64E9679B0C7} - msvcffftestglobalc - 10.0.17763.0 - - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - ClCompile - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - - Level3 - Disabled - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions) - - - - - Level3 - Disabled - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions) - - - - - Level3 - MaxSpeed - true - true - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions) - - - true - true - - - - - Level3 - MaxSpeed - true - true - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions) - - - true - true - - - - - - - - - - - - - - - diff --git a/test/ms_vc_fff_test/ms_vc_fff_test_global_c/ms_vc_fff_test_global_c.vcxproj.filters b/test/ms_vc_fff_test/ms_vc_fff_test_global_c/ms_vc_fff_test_global_c.vcxproj.filters deleted file mode 100644 index db5afef..0000000 --- a/test/ms_vc_fff_test/ms_vc_fff_test_global_c/ms_vc_fff_test_global_c.vcxproj.filters +++ /dev/null @@ -1,36 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/test/ms_vc_fff_test/ms_vc_fff_test_global_cpp/ms_vc_fff_test_global_cpp.vcxproj b/test/ms_vc_fff_test/ms_vc_fff_test_global_cpp/ms_vc_fff_test_global_cpp.vcxproj deleted file mode 100644 index 2e93d90..0000000 --- a/test/ms_vc_fff_test/ms_vc_fff_test_global_cpp/ms_vc_fff_test_global_cpp.vcxproj +++ /dev/null @@ -1,149 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {4384428B-E0FE-404D-A6EB-8CD9A3C88E5C} - msvcffftestglobalcpp - 10.0.17763.0 - - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - $(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - - Level3 - Disabled - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions) - - - - - Level3 - Disabled - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions) - - - - - Level3 - MaxSpeed - true - true - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions) - - - true - true - - - - - Level3 - MaxSpeed - true - true - true - true - _CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions) - - - true - true - - - - - {792fdc07-43a6-42bb-abd5-18ba1a8b17e7} - - - - - - - - - - - - - - - diff --git a/test/ms_vc_fff_test/ms_vc_fff_test_global_cpp/ms_vc_fff_test_global_cpp.vcxproj.filters b/test/ms_vc_fff_test/ms_vc_fff_test_global_cpp/ms_vc_fff_test_global_cpp.vcxproj.filters deleted file mode 100644 index ebf3bc7..0000000 --- a/test/ms_vc_fff_test/ms_vc_fff_test_global_cpp/ms_vc_fff_test_global_cpp.vcxproj.filters +++ /dev/null @@ -1,36 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - \ No newline at end of file