mirror of
https://github.com/meekrosoft/fff
synced 2026-01-23 16:35:59 +01:00
Compare commits
18 Commits
github-wor
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5111c61e1e | ||
|
|
a9cb716818 | ||
|
|
11ab05b518 | ||
|
|
3ede05133f | ||
|
|
d254d115e1 | ||
|
|
2cce6b0fc8 | ||
|
|
1f6a3c8331 | ||
|
|
7e0126b732 | ||
|
|
488442255c | ||
|
|
d4fed915a3 | ||
|
|
25d4c616be | ||
|
|
21f1693002 | ||
|
|
78555cb85c | ||
|
|
2eb067e5a1 | ||
|
|
ff70585de8 | ||
|
|
c325073b44 | ||
|
|
bdb739732b | ||
|
|
c9bebd9d14 |
@@ -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
|
|
||||||
28
.github/workflows/build.yaml
vendored
28
.github/workflows/build.yaml
vendored
@@ -1,28 +0,0 @@
|
|||||||
name: Checks
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
windows:
|
|
||||||
name: run on windows
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: ilammy/msvc-dev-cmd@v1.4.1
|
|
||||||
- name: compile
|
|
||||||
run: |
|
|
||||||
dir /s /b /o:gn
|
|
||||||
mac-and-ubuntu:
|
|
||||||
runs-on: ${{matrix.os}}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [macos-latest, ubuntu-latest]
|
|
||||||
name: ${{matrix.os}}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: compile
|
|
||||||
run: |
|
|
||||||
./buildandtest
|
|
||||||
25
.github/workflows/verify_pr.yaml
vendored
Normal file
25
.github/workflows/verify_pr.yaml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Check PR
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
push:
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-pr:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: seanmiddleditch/gha-setup-ninja@master
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cmake -GNinja -B build
|
||||||
|
cmake --build build
|
||||||
|
ctest --test-dir build --output-on-failure
|
||||||
|
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -25,6 +25,9 @@ bld/
|
|||||||
# Visual Studio 2015/2017 cache/options directory
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
.vs/
|
.vs/
|
||||||
|
|
||||||
|
# IntelliJ IDE project directory
|
||||||
|
.idea/
|
||||||
|
|
||||||
# Visual C++ cache files
|
# Visual C++ cache files
|
||||||
ipch/
|
ipch/
|
||||||
*.aps
|
*.aps
|
||||||
|
|||||||
46
CMakeLists.txt
Normal file
46
CMakeLists.txt
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# Copyright 2022 Google LLC
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
project(fff)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
|
# Enable ctest
|
||||||
|
enable_testing()
|
||||||
|
|
||||||
|
add_library(fff INTERFACE)
|
||||||
|
|
||||||
|
option(FFF_GENERATE "If enabled, fff.h will be regenerated using ruby" OFF)
|
||||||
|
|
||||||
|
# Generate fff.h if fakegen.rb changed
|
||||||
|
if(FFF_GENERATE)
|
||||||
|
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)
|
||||||
|
else()
|
||||||
|
add_library(fff_h INTERFACE)
|
||||||
|
set_target_properties(fff_h
|
||||||
|
PROPERTIES PUBLIC_HEADER "fff.h"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_dependencies(fff fff_h)
|
||||||
|
|
||||||
|
# Add an interface library for fff.h
|
||||||
|
target_include_directories(fff INTERFACE ${CMAKE_CURRENT_LIST_DIR})
|
||||||
|
|
||||||
|
option(FFF_UNIT_TESTING "If enabled, fff tests will be compiled and run" OFF)
|
||||||
|
|
||||||
|
if(FFF_UNIT_TESTING)
|
||||||
|
# Add tests and samples
|
||||||
|
add_subdirectory(test)
|
||||||
|
add_subdirectory(examples)
|
||||||
|
endif()
|
||||||
10
Makefile
10
Makefile
@@ -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
|
|
||||||
38
README.md
38
README.md
@@ -28,6 +28,18 @@
|
|||||||
fff is a micro-framework for creating fake C functions for tests. Because life
|
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.
|
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 -B build -DFFF_GENERATE=ON -DFFF_UNIT_TESTING=ON
|
||||||
|
cmake --build build
|
||||||
|
ctest --test-dir build --output-on-failure
|
||||||
|
```
|
||||||
|
|
||||||
## Hello Fake World!
|
## Hello Fake World!
|
||||||
|
|
||||||
Say you are testing an embedded user interface and you have a function that
|
Say you are testing an embedded user interface and you have a function that
|
||||||
@@ -447,9 +459,17 @@ The basic mechanism that fff provides you in this case is the custom_fake field
|
|||||||
|
|
||||||
You need to create a custom function (e.g. getTime_custom_fake) to produce the output optionally by use of a helper variable (e.g. getTime_custom_now) to retrieve that output from. Then some creativity to tie it all together. The most important part (IMHO) is to keep your test case readable and maintainable.
|
You need to create a custom function (e.g. getTime_custom_fake) to produce the output optionally by use of a helper variable (e.g. getTime_custom_now) to retrieve that output from. Then some creativity to tie it all together. The most important part (IMHO) is to keep your test case readable and maintainable.
|
||||||
|
|
||||||
In case your project uses a C compiler that supports nested functions (e.g. GCC) you can even combine all this in a single unit test function so you can easily oversee all details of the test.
|
In case your project uses a C compiler that supports nested functions (e.g. GCC), or when using C++ lambdas, you can even combine all this in a single unit test function so you can easily oversee all details of the test.
|
||||||
|
|
||||||
```c
|
```c
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
|
/* Configure FFF to use std::function, which enables capturing lambdas */
|
||||||
|
#define CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN, FUNCNAME, ...) \
|
||||||
|
std::function<RETURN (__VA_ARGS__)> FUNCNAME
|
||||||
|
|
||||||
|
#include "fff.h"
|
||||||
|
|
||||||
/* The time structure */
|
/* The time structure */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int hour, min;
|
int hour, min;
|
||||||
@@ -462,15 +482,13 @@ FAKE_VOID_FUNC(getTime, Time*);
|
|||||||
TEST_F(FFFTestSuite, when_value_custom_fake_called_THEN_it_returns_custom_output)
|
TEST_F(FFFTestSuite, when_value_custom_fake_called_THEN_it_returns_custom_output)
|
||||||
{
|
{
|
||||||
Time t;
|
Time t;
|
||||||
Time getTime_custom_now;
|
Time getTime_custom_now = {
|
||||||
void getTime_custom_fake(Time *now) {
|
.hour = 13,
|
||||||
*now = getTime_custom_now;
|
.min = 05,
|
||||||
}
|
};
|
||||||
getTime_fake.custom_fake = getTime_custom_fake;
|
getTime_fake.custom_fake = [getTime_custom_now](Time *now) {
|
||||||
|
*now = getTime_custom_now;
|
||||||
/* given a specific time */
|
};
|
||||||
getTime_custom_now.hour = 13;
|
|
||||||
getTime_custom_now.min = 05;
|
|
||||||
|
|
||||||
/* when getTime is called */
|
/* when getTime is called */
|
||||||
getTime(&t);
|
getTime(&t);
|
||||||
|
|||||||
27
buildandtest
27
buildandtest
@@ -1,20 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cat LICENSE > fff.h
|
# Clear the environment
|
||||||
echo >> fff.h
|
rm -fr build fff.h
|
||||||
ruby fakegen.rb >> fff.h
|
mkdir build
|
||||||
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
|
|
||||||
|
|
||||||
|
# Configure the build
|
||||||
|
cmake -B build -DFFF_GENERATE=ON -DFFF_UNIT_TESTING=ON || exit -1
|
||||||
|
|
||||||
|
# Build all targets
|
||||||
|
cmake --build build || exit -1
|
||||||
|
|
||||||
|
# Run all tests
|
||||||
|
ctest --test-dir build --output-on-failure
|
||||||
|
|||||||
6
examples/CMakeLists.txt
Normal file
6
examples/CMakeLists.txt
Normal file
@@ -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)
|
||||||
@@ -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
|
|
||||||
|
|
||||||
31
examples/driver_testing/CMakeLists.txt
Normal file
31
examples/driver_testing/CMakeLists.txt
Normal file
@@ -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::gtest_main 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::gtest_main 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 $<TARGET_FILE:driver_test>
|
||||||
|
)
|
||||||
|
|
||||||
|
add_test(
|
||||||
|
NAME driver_fff_test
|
||||||
|
COMMAND $<TARGET_FILE:driver_fff_test>
|
||||||
|
)
|
||||||
@@ -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"
|
|
||||||
@@ -3,7 +3,7 @@ extern "C"
|
|||||||
#include "driver.h"
|
#include "driver.h"
|
||||||
#include "registers.h"
|
#include "registers.h"
|
||||||
}
|
}
|
||||||
#include "../../fff.h"
|
#include "../../../fff.h"
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -3,7 +3,7 @@ extern "C"{
|
|||||||
#include "registers.h"
|
#include "registers.h"
|
||||||
#include "hardware_abstraction.h"
|
#include "hardware_abstraction.h"
|
||||||
}
|
}
|
||||||
#include "../../fff.h"
|
#include "fff.h"
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
DEFINE_FFF_GLOBALS;
|
DEFINE_FFF_GLOBALS;
|
||||||
23
examples/embedded_ui/CMakeLists.txt
Normal file
23
examples/embedded_ui/CMakeLists.txt
Normal file
@@ -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::gtest_main fff)
|
||||||
|
|
||||||
|
# Add tests to ctest
|
||||||
|
add_test(
|
||||||
|
NAME ui_test_ansic
|
||||||
|
COMMAND $<TARGET_FILE:ui_test_ansic>
|
||||||
|
)
|
||||||
|
|
||||||
|
add_test(
|
||||||
|
NAME ui_test_cpp
|
||||||
|
COMMAND $<TARGET_FILE:ui_test_cpp>
|
||||||
|
)
|
||||||
@@ -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"
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "UI.h"
|
#include "UI.h"
|
||||||
#include "../../fff.h"
|
#include "fff.h"
|
||||||
#include "SYSTEM.h"
|
#include "SYSTEM.h"
|
||||||
#include "DISPLAY.h"
|
#include "DISPLAY.h"
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ extern "C"{
|
|||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
|
||||||
#include "../../fff.h"
|
#include "fff.h"
|
||||||
DEFINE_FFF_GLOBALS;
|
DEFINE_FFF_GLOBALS;
|
||||||
|
|
||||||
/* SYSTEM.h */
|
/* SYSTEM.h */
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
54
examples/weak_linking/CMakeLists.txt
Normal file
54
examples/weak_linking/CMakeLists.txt
Normal file
@@ -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 $<TARGET_FILE:test_main>
|
||||||
|
)
|
||||||
|
|
||||||
|
add_test(
|
||||||
|
NAME test_sensor
|
||||||
|
COMMAND $<TARGET_FILE:test_sensor>
|
||||||
|
)
|
||||||
|
|
||||||
|
add_test(
|
||||||
|
NAME test_display
|
||||||
|
COMMAND $<TARGET_FILE:test_display>
|
||||||
|
)
|
||||||
@@ -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)
|
|
||||||
5
examples/weak_linking/config/config.h.in
Normal file
5
examples/weak_linking/config/config.h.in
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/* Copyright 2022 Google LLC
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#cmakedefine FFF_GCC_FUNCTION_ATTRIBUTES @FFF_GCC_FUNCTION_ATTRIBUTES@
|
||||||
47
fakegen.rb
47
fakegen.rb
@@ -8,6 +8,10 @@ $MAX_ARGS = 20
|
|||||||
$DEFAULT_ARG_HISTORY = 50
|
$DEFAULT_ARG_HISTORY = 50
|
||||||
$MAX_CALL_HISTORY = 50
|
$MAX_CALL_HISTORY = 50
|
||||||
|
|
||||||
|
def license
|
||||||
|
File.foreach("#{__dir__}/LICENSE") { |line| putd line }
|
||||||
|
end
|
||||||
|
|
||||||
def include_dependencies
|
def include_dependencies
|
||||||
putd "#include <stdarg.h>"
|
putd "#include <stdarg.h>"
|
||||||
putd "#include <string.h> /* For memset and memcpy */"
|
putd "#include <string.h> /* For memset and memcpy */"
|
||||||
@@ -35,6 +39,17 @@ def output_constants
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def output_default_function_pointer_macro(has_calling_conventions)
|
||||||
|
name = has_calling_conventions ? "(CALLING_CONVENTION *FUNCNAME)" : "(*FUNCNAME)"
|
||||||
|
calling_conv = has_calling_conventions ? ", CALLING_CONVENTION" : ""
|
||||||
|
putd "#ifndef CUSTOM_FFF_FUNCTION_TEMPLATE"
|
||||||
|
putd_backslash "#define CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN#{calling_conv}, FUNCNAME, ...)"
|
||||||
|
indent {
|
||||||
|
putd "RETURN#{name}(__VA_ARGS__)"
|
||||||
|
}
|
||||||
|
putd "#endif /* CUSTOM_FFF_FUNCTION_TEMPLATE */"
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -231,7 +246,9 @@ def define_reset_fake_helper
|
|||||||
indent {
|
indent {
|
||||||
putd_backslash "void FUNCNAME##_reset(void){"
|
putd_backslash "void FUNCNAME##_reset(void){"
|
||||||
indent {
|
indent {
|
||||||
putd_backslash "memset(&FUNCNAME##_fake, 0, sizeof(FUNCNAME##_fake));"
|
putd_backslash "memset((void*)&FUNCNAME##_fake, 0, sizeof(FUNCNAME##_fake) - sizeof(FUNCNAME##_fake.custom_fake) - sizeof(FUNCNAME##_fake.custom_fake_seq));"
|
||||||
|
putd_backslash "FUNCNAME##_fake.custom_fake = NULL;"
|
||||||
|
putd_backslash "FUNCNAME##_fake.custom_fake_seq = NULL;"
|
||||||
putd_backslash "FUNCNAME##_fake.arg_history_len = FFF_ARG_HISTORY_LEN;"
|
putd_backslash "FUNCNAME##_fake.arg_history_len = FFF_ARG_HISTORY_LEN;"
|
||||||
}
|
}
|
||||||
putd "}"
|
putd "}"
|
||||||
@@ -355,6 +372,14 @@ def arg_val_list(args_count)
|
|||||||
arguments.join(", ")
|
arguments.join(", ")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#example: ARG0_TYPE, ARG1_TYPE
|
||||||
|
def arg_type_list(args_count)
|
||||||
|
return "void" if (args_count == 0)
|
||||||
|
arguments = []
|
||||||
|
args_count.times { |i| arguments << "ARG#{i}_TYPE" }
|
||||||
|
arguments.join(", ")
|
||||||
|
end
|
||||||
|
|
||||||
#example: arg0, arg1
|
#example: arg0, arg1
|
||||||
def arg_list(args_count)
|
def arg_list(args_count)
|
||||||
arguments = []
|
arguments = []
|
||||||
@@ -370,17 +395,15 @@ end
|
|||||||
def output_custom_function_signature(arg_count, has_varargs, has_calling_conventions, is_value_function)
|
def output_custom_function_signature(arg_count, has_varargs, has_calling_conventions, is_value_function)
|
||||||
return_type = is_value_function ? "RETURN_TYPE" : "void"
|
return_type = is_value_function ? "RETURN_TYPE" : "void"
|
||||||
ap_list = has_varargs ? ", va_list ap" : ""
|
ap_list = has_varargs ? ", va_list ap" : ""
|
||||||
signature = has_calling_conventions ? "(CALLING_CONVENTION *custom_fake)" : "(*custom_fake)"
|
calling_conv = has_calling_conventions ? ", CALLING_CONVENTION" : ""
|
||||||
signature += "(#{arg_val_list(arg_count)}#{ap_list});"
|
putd_backslash "CUSTOM_FFF_FUNCTION_TEMPLATE(#{return_type}#{calling_conv}, custom_fake, #{arg_type_list(arg_count)}#{ap_list});"
|
||||||
putd_backslash return_type + signature
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def output_custom_function_array(arg_count, has_varargs, has_calling_conventions, is_value_function)
|
def output_custom_function_array(arg_count, has_varargs, has_calling_conventions, is_value_function)
|
||||||
return_type = is_value_function ? "RETURN_TYPE" : "void"
|
return_type = is_value_function ? "RETURN_TYPE" : "void"
|
||||||
ap_list = has_varargs ? ", va_list ap" : ""
|
ap_list = has_varargs ? ", va_list ap" : ""
|
||||||
custom_array = has_calling_conventions ? "(CALLING_CONVENTION **custom_fake_seq)" : "(**custom_fake_seq)"
|
calling_conv = has_calling_conventions ? ", CALLING_CONVENTION" : ""
|
||||||
custom_array += "(#{arg_val_list(arg_count)}#{ap_list});"
|
putd_backslash "CUSTOM_FFF_FUNCTION_TEMPLATE(#{return_type}#{calling_conv}, *custom_fake_seq, #{arg_type_list(arg_count)}#{ap_list});"
|
||||||
putd_backslash return_type + custom_array
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# example: RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1)
|
# example: RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1)
|
||||||
@@ -433,7 +456,7 @@ def output_function_body(arg_count, has_varargs, is_value_function)
|
|||||||
putd_backslash "SAVE_RET_HISTORY(FUNCNAME, ret);" unless not is_value_function
|
putd_backslash "SAVE_RET_HISTORY(FUNCNAME, ret);" unless not is_value_function
|
||||||
putd_backslash "va_end(ap);" unless not is_value_function
|
putd_backslash "va_end(ap);" unless not is_value_function
|
||||||
putd_backslash "return ret;" unless not is_value_function
|
putd_backslash "return ret;" unless not is_value_function
|
||||||
putd_backslash "#{return_type}FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](#{arg_list(arg_count)}, ap);"
|
putd_backslash "#{return_type}FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](#{arg_list(arg_count)}, ap);" unless is_value_function
|
||||||
putd_backslash "va_end(ap);" unless is_value_function
|
putd_backslash "va_end(ap);" unless is_value_function
|
||||||
}
|
}
|
||||||
putd_backslash "}"
|
putd_backslash "}"
|
||||||
@@ -474,17 +497,17 @@ def output_function_body(arg_count, has_varargs, is_value_function)
|
|||||||
putd_backslash "RETURN_TYPE ret = FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](#{arg_list(arg_count)});" unless not is_value_function
|
putd_backslash "RETURN_TYPE ret = FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](#{arg_list(arg_count)});" unless not is_value_function
|
||||||
putd_backslash "SAVE_RET_HISTORY(FUNCNAME, ret);" unless not is_value_function
|
putd_backslash "SAVE_RET_HISTORY(FUNCNAME, ret);" unless not is_value_function
|
||||||
putd_backslash "return ret;" unless not is_value_function
|
putd_backslash "return ret;" unless not is_value_function
|
||||||
putd_backslash "#{return_type}FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](#{arg_list(arg_count)});"
|
putd_backslash "#{return_type}FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](#{arg_list(arg_count)});" unless is_value_function
|
||||||
}
|
}
|
||||||
putd_backslash "}"
|
putd_backslash "}"
|
||||||
}
|
}
|
||||||
putd_backslash "}"
|
putd_backslash "}"
|
||||||
putd_backslash "if (FUNCNAME##_fake.custom_fake){ "
|
putd_backslash "if (FUNCNAME##_fake.custom_fake != NULL){ "
|
||||||
indent {
|
indent {
|
||||||
putd_backslash "RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(#{arg_list(arg_count)});" unless not is_value_function
|
putd_backslash "RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(#{arg_list(arg_count)});" unless not is_value_function
|
||||||
putd_backslash "SAVE_RET_HISTORY(FUNCNAME, ret);" unless not is_value_function
|
putd_backslash "SAVE_RET_HISTORY(FUNCNAME, ret);" unless not is_value_function
|
||||||
putd_backslash "return ret;" unless not is_value_function
|
putd_backslash "return ret;" unless not is_value_function
|
||||||
putd_backslash "#{return_type}FUNCNAME##_fake.custom_fake(#{arg_list(arg_count)});"
|
putd_backslash "#{return_type}FUNCNAME##_fake.custom_fake(#{arg_list(arg_count)});" unless is_value_function
|
||||||
}
|
}
|
||||||
putd_backslash "}"
|
putd_backslash "}"
|
||||||
end
|
end
|
||||||
@@ -636,9 +659,11 @@ def output_macro_counting_shortcuts(has_calling_conventions)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def output_c_and_cpp(has_calling_conventions)
|
def output_c_and_cpp(has_calling_conventions)
|
||||||
|
license
|
||||||
include_guard {
|
include_guard {
|
||||||
include_dependencies
|
include_dependencies
|
||||||
output_constants
|
output_constants
|
||||||
|
output_default_function_pointer_macro(has_calling_conventions)
|
||||||
output_internal_helper_macros
|
output_internal_helper_macros
|
||||||
yield
|
yield
|
||||||
output_macro_counting_shortcuts(has_calling_conventions)
|
output_macro_counting_shortcuts(has_calling_conventions)
|
||||||
|
|||||||
@@ -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 ' '
|
|
||||||
|
|
||||||
9118
gtest/gtest-all.cc
9118
gtest/gtest-all.cc
File diff suppressed because it is too large
Load Diff
@@ -1,6 +0,0 @@
|
|||||||
#include "gtest.h"
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
|
||||||
::testing::InitGoogleTest(&argc, argv);
|
|
||||||
return RUN_ALL_TESTS();
|
|
||||||
}
|
|
||||||
19537
gtest/gtest.h
19537
gtest/gtest.h
File diff suppressed because it is too large
Load Diff
87
test/CMakeLists.txt
Normal file
87
test/CMakeLists.txt
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
# Copyright 2022 Google LLC
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
# Create a list of common files needed for tests
|
||||||
|
set(
|
||||||
|
COMMON_FILE_LIST
|
||||||
|
include/c_test_framework.h
|
||||||
|
src/test_cases.include
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FetchContent)
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
|
googletest
|
||||||
|
GIT_REPOSITORY https://github.com/google/googletest.git
|
||||||
|
GIT_TAG v1.12.0
|
||||||
|
)
|
||||||
|
|
||||||
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||||
|
FetchContent_MakeAvailable(googletest)
|
||||||
|
|
||||||
|
# Create the C test executable
|
||||||
|
add_executable(c_test src/fff_test_c.c ${COMMON_FILE_LIST})
|
||||||
|
target_include_directories(c_test PRIVATE include)
|
||||||
|
target_link_libraries(c_test PRIVATE fff)
|
||||||
|
|
||||||
|
# Create the C++ test executable
|
||||||
|
add_executable(cpp_test src/fff_test_cpp.cpp ${COMMON_FILE_LIST})
|
||||||
|
target_include_directories(cpp_test PRIVATE include)
|
||||||
|
target_link_libraries(cpp_test PRIVATE GTest::gtest_main fff)
|
||||||
|
|
||||||
|
# Create the C global test executable
|
||||||
|
add_executable(c_global_test
|
||||||
|
src/fff_test_global_c.c
|
||||||
|
src/global_fakes.c
|
||||||
|
include/global_fakes.h
|
||||||
|
${COMMON_FILE_LIST}
|
||||||
|
)
|
||||||
|
target_include_directories(c_global_test PRIVATE include)
|
||||||
|
target_link_libraries(c_global_test PRIVATE fff)
|
||||||
|
|
||||||
|
# Create the C++ global test executable
|
||||||
|
add_executable(cpp_global_test
|
||||||
|
src/fff_test_global_cpp.cpp
|
||||||
|
src/global_fakes.c
|
||||||
|
include/global_fakes.h
|
||||||
|
${COMMON_FILE_LIST}
|
||||||
|
)
|
||||||
|
target_include_directories(cpp_global_test PRIVATE include)
|
||||||
|
target_link_libraries(cpp_global_test PRIVATE GTest::gtest_main fff)
|
||||||
|
|
||||||
|
# Create the C++ custom function signature executable
|
||||||
|
add_executable(cpp_custom_fn_signature_test
|
||||||
|
src/fff_test_custom_function_template.cpp
|
||||||
|
${COMMON_FILE_LIST}
|
||||||
|
)
|
||||||
|
target_include_directories(cpp_custom_fn_signature_test PRIVATE include)
|
||||||
|
target_link_libraries(cpp_custom_fn_signature_test PRIVATE GTest::gtest_main fff)
|
||||||
|
# Due to a bug in WinLibs for Windows it's not currently possible to use:
|
||||||
|
# target_precompile_headers(cpp_custom_fn_signature_test PUBLIC include/custom_function.hpp)
|
||||||
|
# See more info at target_precompile_headers(cpp_custom_fn_signature_test PUBLIC include/custom_function.hpp)
|
||||||
|
|
||||||
|
add_test(
|
||||||
|
NAME cpp_custom_fn_signature_test
|
||||||
|
COMMAND $<TARGET_FILE:cpp_custom_fn_signature_test>
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add the tests for ctest
|
||||||
|
add_test(
|
||||||
|
NAME c_test
|
||||||
|
COMMAND $<TARGET_FILE:c_test>
|
||||||
|
)
|
||||||
|
|
||||||
|
add_test(
|
||||||
|
NAME cpp_test
|
||||||
|
COMMAND $<TARGET_FILE:cpp_test>
|
||||||
|
)
|
||||||
|
|
||||||
|
add_test(
|
||||||
|
NAME c_global_test
|
||||||
|
COMMAND $<TARGET_FILE:c_global_test>
|
||||||
|
)
|
||||||
|
|
||||||
|
add_test(
|
||||||
|
NAME cpp_global_test
|
||||||
|
COMMAND $<TARGET_FILE:cpp_global_test>
|
||||||
|
)
|
||||||
@@ -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 ' '
|
|
||||||
|
|
||||||
10
test/include/custom_function.hpp
Normal file
10
test/include/custom_function.hpp
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
/* Copyright 2022 Google LLC
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
|
#define CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN, FUNCNAME, ...) \
|
||||||
|
std::function<RETURN (__VA_ARGS__)> FUNCNAME
|
||||||
11
test/include/fff_wrapper.hpp
Normal file
11
test/include/fff_wrapper.hpp
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/* Copyright 2022 Google LLC
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
|
#include "custom_function.hpp"
|
||||||
|
|
||||||
|
#include <fff.h>
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
#ifndef GLOBAL_FAKES_H_
|
#ifndef GLOBAL_FAKES_H_
|
||||||
#define GLOBAL_FAKES_H_
|
#define GLOBAL_FAKES_H_
|
||||||
|
|
||||||
#include "../fff.h"
|
#include <fff.h>
|
||||||
#include "string.h"
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
//// Imaginary production code header file ///
|
//// Imaginary production code header file ///
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<VCProjectVersion>15.0</VCProjectVersion>
|
|
||||||
<ProjectGuid>{CDBC5A3A-59B8-4638-B818-935395302DAF}</ProjectGuid>
|
|
||||||
<RootNamespace>fff2</RootNamespace>
|
|
||||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
|
||||||
<ProjectName>fff</ProjectName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="Shared">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup />
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<PreBuildEvent>
|
|
||||||
<Command>del $(SolutionDir)..\..\fff.h
|
|
||||||
ruby.exe $(SolutionDir)..\..\fakegen.rb -wcc > $(SolutionDir)..\..\fff.h</Command>
|
|
||||||
</PreBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<PreBuildEvent>
|
|
||||||
<Command>del $(SolutionDir)..\..\fff.h
|
|
||||||
ruby.exe $(SolutionDir)..\..\fakegen.rb -wcc > $(SolutionDir)..\..\fff.h</Command>
|
|
||||||
</PreBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
</Link>
|
|
||||||
<PreBuildEvent>
|
|
||||||
<Command>del $(SolutionDir)..\..\fff.h
|
|
||||||
ruby.exe $(SolutionDir)..\..\fakegen.rb -wcc > $(SolutionDir)..\..\fff.h</Command>
|
|
||||||
</PreBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
</Link>
|
|
||||||
<PreBuildEvent>
|
|
||||||
<Command>del $(SolutionDir)..\..\fff.h
|
|
||||||
ruby.exe $(SolutionDir)..\..\fakegen.rb -wcc > $(SolutionDir)..\..\fff.h</Command>
|
|
||||||
</PreBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\fff.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Source Files">
|
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files">
|
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Resource Files">
|
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\fff.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,163 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<VCProjectVersion>15.0</VCProjectVersion>
|
|
||||||
<ProjectGuid>{792FDC07-43A6-42BB-ABD5-18BA1A8B17E7}</ProjectGuid>
|
|
||||||
<Keyword>Win32Proj</Keyword>
|
|
||||||
<RootNamespace>gtest</RootNamespace>
|
|
||||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="Shared">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath)</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath)</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath)</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath)</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\..\gtest\gtest-all.cc" />
|
|
||||||
<ClCompile Include="..\..\..\gtest\gtest-main.cc" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\gtest\gtest.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Source Files">
|
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files">
|
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Resource Files">
|
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\..\gtest\gtest-all.cc">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\gtest\gtest-main.cc">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\gtest\gtest.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -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
|
|
||||||
@@ -1,150 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\fff_test_c.c" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\fff.h" />
|
|
||||||
<ClInclude Include="..\..\c_test_framework.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<VCProjectVersion>15.0</VCProjectVersion>
|
|
||||||
<ProjectGuid>{B7658726-71D3-48B3-8BD2-6D383A60DC8E}</ProjectGuid>
|
|
||||||
<RootNamespace>msvcffftest</RootNamespace>
|
|
||||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
|
||||||
<ProjectName>ms_vc_fff_test_c</ProjectName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="Shared">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath)</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath)</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath)</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(IncludePath)</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;._MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;._MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;._MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;._MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Source Files">
|
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files">
|
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Resource Files">
|
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\fff_test_c.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\c_test_framework.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\fff.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,154 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<VCProjectVersion>15.0</VCProjectVersion>
|
|
||||||
<ProjectGuid>{00EE1499-1C86-4F7B-8A00-9EBE696D0142}</ProjectGuid>
|
|
||||||
<RootNamespace>msvcffftestcpp</RootNamespace>
|
|
||||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="Shared">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\..\gtest\gtest-main.cc" />
|
|
||||||
<ClCompile Include="..\..\fff_test_cpp.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\gtest\gtest.vcxproj">
|
|
||||||
<Project>{792fdc07-43a6-42bb-abd5-18ba1a8b17e7}</Project>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\fff.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Source Files">
|
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files">
|
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Resource Files">
|
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\fff_test_cpp.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\gtest\gtest-main.cc">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\fff.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,147 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<VCProjectVersion>15.0</VCProjectVersion>
|
|
||||||
<ProjectGuid>{0F70375A-2C80-4B07-9EA0-A64E9679B0C7}</ProjectGuid>
|
|
||||||
<RootNamespace>msvcffftestglobalc</RootNamespace>
|
|
||||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="Shared">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\fff_test_global_c.c" />
|
|
||||||
<ClCompile Include="..\..\global_fakes.c" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\fff.h" />
|
|
||||||
<ClInclude Include="..\..\c_test_framework.h" />
|
|
||||||
<ClInclude Include="..\..\global_fakes.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Source Files">
|
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files">
|
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Resource Files">
|
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\fff_test_global_c.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\global_fakes.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\global_fakes.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\c_test_framework.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\fff.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<VCProjectVersion>15.0</VCProjectVersion>
|
|
||||||
<ProjectGuid>{4384428B-E0FE-404D-A6EB-8CD9A3C88E5C}</ProjectGuid>
|
|
||||||
<RootNamespace>msvcffftestglobalcpp</RootNamespace>
|
|
||||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="Shared">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<IncludePath>$(SolutionDir)..\..\gtest;$(SolutionDir)..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;TEST_WITH_CALLING_CONVENTIONS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\gtest\gtest.vcxproj">
|
|
||||||
<Project>{792fdc07-43a6-42bb-abd5-18ba1a8b17e7}</Project>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\..\gtest\gtest-main.cc" />
|
|
||||||
<ClCompile Include="..\..\fff_test_global_cpp.cpp" />
|
|
||||||
<ClCompile Include="..\..\global_fakes.c" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\fff.h" />
|
|
||||||
<ClInclude Include="..\..\global_fakes.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Source Files">
|
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files">
|
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Resource Files">
|
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\fff_test_global_cpp.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\gtest\gtest-main.cc">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\global_fakes.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\global_fakes.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\fff.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
#define OVERRIDE_CALL_HIST_LEN 17u
|
#define OVERRIDE_CALL_HIST_LEN 17u
|
||||||
#define FFF_CALL_HISTORY_LEN OVERRIDE_CALL_HIST_LEN
|
#define FFF_CALL_HISTORY_LEN OVERRIDE_CALL_HIST_LEN
|
||||||
|
|
||||||
#include "../fff.h"
|
#include "fff.h"
|
||||||
#include "c_test_framework.h"
|
#include "c_test_framework.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
#define OVERRIDE_CALL_HIST_LEN 17u
|
#define OVERRIDE_CALL_HIST_LEN 17u
|
||||||
#define FFF_CALL_HISTORY_LEN OVERRIDE_CALL_HIST_LEN
|
#define FFF_CALL_HISTORY_LEN OVERRIDE_CALL_HIST_LEN
|
||||||
|
|
||||||
#include "../fff.h"
|
#include "fff.h"
|
||||||
#include <gtest/gtest.h>
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
DEFINE_FFF_GLOBALS
|
DEFINE_FFF_GLOBALS
|
||||||
|
|
||||||
29
test/src/fff_test_custom_function_template.cpp
Normal file
29
test/src/fff_test_custom_function_template.cpp
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
/* Copyright 2022 Google LLC
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#include "fff_wrapper.hpp"
|
||||||
|
|
||||||
|
DEFINE_FFF_GLOBALS
|
||||||
|
|
||||||
|
FAKE_VOID_FUNC(do_stuff, int);
|
||||||
|
|
||||||
|
class FFFCustomFakeSuite : public ::testing::Test {
|
||||||
|
public:
|
||||||
|
void SetUp() override {
|
||||||
|
RESET_FAKE(do_stuff);
|
||||||
|
FFF_RESET_HISTORY();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_F(FFFCustomFakeSuite, custom_cpp_fake_function)
|
||||||
|
{
|
||||||
|
int x = 0;
|
||||||
|
do_stuff_fake.custom_fake = [&x](int i) {
|
||||||
|
x = i;
|
||||||
|
};
|
||||||
|
do_stuff(5);
|
||||||
|
ASSERT_EQ(5, x);
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
extern "C"{
|
extern "C"{
|
||||||
#include "global_fakes.h"
|
#include "global_fakes.h"
|
||||||
}
|
}
|
||||||
#include <gtest/gtest.h>
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
DEFINE_FFF_GLOBALS;
|
DEFINE_FFF_GLOBALS;
|
||||||
|
|
||||||
@@ -244,9 +244,11 @@ void voidfunc1outparam_custom_fake3(char *a)
|
|||||||
|
|
||||||
TEST_F(FFFTestSuite, custom_fake_sequence_not_exausthed)
|
TEST_F(FFFTestSuite, custom_fake_sequence_not_exausthed)
|
||||||
{
|
{
|
||||||
void (*custom_fakes[])(char *) = {voidfunc1outparam_custom_fake1,
|
CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fakes[], char *) = {
|
||||||
voidfunc1outparam_custom_fake2,
|
voidfunc1outparam_custom_fake1,
|
||||||
voidfunc1outparam_custom_fake3};
|
voidfunc1outparam_custom_fake2,
|
||||||
|
voidfunc1outparam_custom_fake3
|
||||||
|
};
|
||||||
char a = 'a';
|
char a = 'a';
|
||||||
|
|
||||||
SET_CUSTOM_FAKE_SEQ(voidfunc1outparam, custom_fakes, 3);
|
SET_CUSTOM_FAKE_SEQ(voidfunc1outparam, custom_fakes, 3);
|
||||||
@@ -304,9 +306,10 @@ long custom_longfunc3(void)
|
|||||||
|
|
||||||
TEST_F(FFFTestSuite, custom_fake_seq_return_values_saved_in_history)
|
TEST_F(FFFTestSuite, custom_fake_seq_return_values_saved_in_history)
|
||||||
{
|
{
|
||||||
long (*custom_fakes[])(void) = {custom_longfunc1,
|
CUSTOM_FFF_FUNCTION_TEMPLATE(long, custom_fakes[], void) = {
|
||||||
custom_longfunc2,
|
custom_longfunc1,
|
||||||
custom_longfunc3};
|
custom_longfunc2,
|
||||||
|
custom_longfunc3};
|
||||||
|
|
||||||
SET_CUSTOM_FAKE_SEQ(longfunc0, custom_fakes, 3);
|
SET_CUSTOM_FAKE_SEQ(longfunc0, custom_fakes, 3);
|
||||||
|
|
||||||
@@ -321,9 +324,10 @@ TEST_F(FFFTestSuite, custom_fake_seq_return_values_saved_in_history)
|
|||||||
|
|
||||||
TEST_F(FFFTestSuite, custom_fake_sequence_exhausted)
|
TEST_F(FFFTestSuite, custom_fake_sequence_exhausted)
|
||||||
{
|
{
|
||||||
void (*custom_fakes[])(char *) = {voidfunc1outparam_custom_fake1,
|
CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fakes[], char *) = {
|
||||||
voidfunc1outparam_custom_fake2,
|
voidfunc1outparam_custom_fake1,
|
||||||
voidfunc1outparam_custom_fake3};
|
voidfunc1outparam_custom_fake2,
|
||||||
|
voidfunc1outparam_custom_fake3};
|
||||||
char a = 'a';
|
char a = 'a';
|
||||||
|
|
||||||
SET_CUSTOM_FAKE_SEQ(voidfunc1outparam, custom_fakes, 3);
|
SET_CUSTOM_FAKE_SEQ(voidfunc1outparam, custom_fakes, 3);
|
||||||
@@ -399,9 +403,10 @@ int valuefunc3var_custom_fake3(const char *str, int a, va_list vl)
|
|||||||
|
|
||||||
TEST_F(FFFTestSuite, vararg_custom_fake_sequence_not_exhausted)
|
TEST_F(FFFTestSuite, vararg_custom_fake_sequence_not_exhausted)
|
||||||
{
|
{
|
||||||
int (*custom_fakes[])(const char *, int, va_list) = {valuefunc3var_custom_fake1,
|
CUSTOM_FFF_FUNCTION_TEMPLATE(int, custom_fakes[], const char *, int,
|
||||||
valuefunc3var_custom_fake2,
|
va_list) = {valuefunc3var_custom_fake1,
|
||||||
valuefunc3var_custom_fake3};
|
valuefunc3var_custom_fake2,
|
||||||
|
valuefunc3var_custom_fake3};
|
||||||
SET_CUSTOM_FAKE_SEQ(valuefunc3var, custom_fakes, 3);
|
SET_CUSTOM_FAKE_SEQ(valuefunc3var, custom_fakes, 3);
|
||||||
int a = 1;
|
int a = 1;
|
||||||
ASSERT_EQ(valuefunc3var("a", a, 2, 3, 4, 0), 10);
|
ASSERT_EQ(valuefunc3var("a", a, 2, 3, 4, 0), 10);
|
||||||
@@ -411,9 +416,10 @@ TEST_F(FFFTestSuite, vararg_custom_fake_sequence_not_exhausted)
|
|||||||
|
|
||||||
TEST_F(FFFTestSuite, vararg_custom_fake_seq_return_values_saved_in_history)
|
TEST_F(FFFTestSuite, vararg_custom_fake_seq_return_values_saved_in_history)
|
||||||
{
|
{
|
||||||
int (*custom_fakes[])(const char *, int, va_list) = {valuefunc3var_custom_fake1,
|
CUSTOM_FFF_FUNCTION_TEMPLATE(int, custom_fakes[], const char *, int,
|
||||||
valuefunc3var_custom_fake2,
|
va_list) = {valuefunc3var_custom_fake1,
|
||||||
valuefunc3var_custom_fake3};
|
valuefunc3var_custom_fake2,
|
||||||
|
valuefunc3var_custom_fake3};
|
||||||
SET_CUSTOM_FAKE_SEQ(valuefunc3var, custom_fakes, 3);
|
SET_CUSTOM_FAKE_SEQ(valuefunc3var, custom_fakes, 3);
|
||||||
int a = 1;
|
int a = 1;
|
||||||
valuefunc3var("a", a, 2, 3, 4, 0);
|
valuefunc3var("a", a, 2, 3, 4, 0);
|
||||||
@@ -426,9 +432,10 @@ TEST_F(FFFTestSuite, vararg_custom_fake_seq_return_values_saved_in_history)
|
|||||||
|
|
||||||
TEST_F(FFFTestSuite, vararg_custom_fake_sequence_exhausted)
|
TEST_F(FFFTestSuite, vararg_custom_fake_sequence_exhausted)
|
||||||
{
|
{
|
||||||
int (*custom_fakes[])(const char *, int, va_list) = {valuefunc3var_custom_fake1,
|
CUSTOM_FFF_FUNCTION_TEMPLATE(int, custom_fakes[], const char *, int,
|
||||||
valuefunc3var_custom_fake2,
|
va_list) = {valuefunc3var_custom_fake1,
|
||||||
valuefunc3var_custom_fake3};
|
valuefunc3var_custom_fake2,
|
||||||
|
valuefunc3var_custom_fake3};
|
||||||
SET_CUSTOM_FAKE_SEQ(valuefunc3var, custom_fakes, 3);
|
SET_CUSTOM_FAKE_SEQ(valuefunc3var, custom_fakes, 3);
|
||||||
int a = 1;
|
int a = 1;
|
||||||
ASSERT_EQ(valuefunc3var("a", a, 2, 3, 4, 0), 10);
|
ASSERT_EQ(valuefunc3var("a", a, 2, 3, 4, 0), 10);
|
||||||
@@ -440,9 +447,10 @@ TEST_F(FFFTestSuite, vararg_custom_fake_sequence_exhausted)
|
|||||||
|
|
||||||
TEST_F(FFFTestSuite, vararg_custom_fake_sequence_reset)
|
TEST_F(FFFTestSuite, vararg_custom_fake_sequence_reset)
|
||||||
{
|
{
|
||||||
int (*custom_fakes[])(const char *, int, va_list) = {valuefunc3var_custom_fake1,
|
CUSTOM_FFF_FUNCTION_TEMPLATE(int, custom_fakes[], const char *, int,
|
||||||
valuefunc3var_custom_fake2,
|
va_list) = {valuefunc3var_custom_fake1,
|
||||||
valuefunc3var_custom_fake3};
|
valuefunc3var_custom_fake2,
|
||||||
|
valuefunc3var_custom_fake3};
|
||||||
SET_CUSTOM_FAKE_SEQ(valuefunc3var, custom_fakes, 3);
|
SET_CUSTOM_FAKE_SEQ(valuefunc3var, custom_fakes, 3);
|
||||||
int a = 1;
|
int a = 1;
|
||||||
ASSERT_EQ(valuefunc3var("a", a, 2, 3, 4, 0), 10);
|
ASSERT_EQ(valuefunc3var("a", a, 2, 3, 4, 0), 10);
|
||||||
@@ -534,4 +542,3 @@ TEST_F(FFFTestSuite, value_func_can_capture_upto_20_arguments_correctly)
|
|||||||
ASSERT_EQ(18, valuefunc20_fake.arg18_val);
|
ASSERT_EQ(18, valuefunc20_fake.arg18_val);
|
||||||
ASSERT_EQ(19, valuefunc20_fake.arg19_val);
|
ASSERT_EQ(19, valuefunc20_fake.arg19_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user