-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding unit tests, googletest, and CMakeLists.txt
- Loading branch information
Showing
244 changed files
with
108,310 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) | ||
|
||
SET(CMAKE_CXX_STANDARD 11) | ||
|
||
ADD_SUBDIRECTORY(googletest) | ||
|
||
ADD_EXECUTABLE(test | ||
unit_test.cpp | ||
dungeon.cpp | ||
enemy.cpp | ||
town.cpp | ||
) | ||
|
||
ADD_EXECUTABLE(main | ||
main.cpp | ||
dungeon.cpp | ||
enemy.cpp | ||
town.cpp | ||
) | ||
|
||
TARGET_LINK_LIBRARIES(test gtest) | ||
TARGET_COMPILE_DEFINITIONS(test PRIVATE gtest_disable_pthreads=ON) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Run manually to reformat a file: | ||
# clang-format -i --style=file <file> | ||
Language: Cpp | ||
BasedOnStyle: Google |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: 'bug' | ||
assignees: '' | ||
--- | ||
|
||
**Describe the bug** | ||
|
||
Include a clear and concise description of what the problem is, including what | ||
you expected to happen, and what actually happened. | ||
|
||
**Steps to reproduce the bug** | ||
|
||
It's important that we are able to reproduce the problem that you are | ||
experiencing. Please provide all code and relevant steps to reproduce the | ||
problem, including your `BUILD`/`CMakeLists.txt` file and build commands. Links | ||
to a GitHub branch or [godbolt.org](https://godbolt.org/) that demonstrate the | ||
problem are also helpful. | ||
|
||
**Does the bug persist in the most recent commit?** | ||
|
||
We recommend using the latest commit in the master branch in your projects. | ||
|
||
**What operating system and version are you using?** | ||
|
||
If you are using a Linux distribution please include the name and version of the | ||
distribution as well. | ||
|
||
**What compiler and version are you using?** | ||
|
||
Please include the output of `gcc -v` or `clang -v`, or the equivalent for your | ||
compiler. | ||
|
||
**What build system are you using?** | ||
|
||
Please include the output of `bazel --version` or `cmake --version`, or the | ||
equivalent for your build system. | ||
|
||
**Additional context** | ||
|
||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
name: Feature request | ||
about: Propose a new feature | ||
title: '' | ||
labels: 'enhancement' | ||
assignees: '' | ||
--- | ||
|
||
**Does the feature exist in the most recent commit?** | ||
|
||
We recommend using the latest commit from GitHub in your projects. | ||
|
||
**Why do we need this feature?** | ||
|
||
Ideally, explain why a combination of existing features cannot be used instead. | ||
|
||
**Describe the proposal** | ||
|
||
Include a detailed description of the feature, with usage examples. | ||
|
||
**Is the feature specific to an operating system, compiler, or build system version?** | ||
|
||
If it is, please specify which versions. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
Linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Tests | ||
run: bazel test --test_output=errors //... | ||
|
||
MacOs: | ||
runs-on: macos-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Tests | ||
run: bazel test --test_output=errors //... | ||
|
||
|
||
Windows: | ||
runs-on: windows-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Tests | ||
run: bazel test --test_output=errors //... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Ignore CI build directory | ||
build/ | ||
xcuserdata | ||
cmake-build-debug/ | ||
.idea/ | ||
bazel-bin | ||
bazel-genfiles | ||
bazel-googletest | ||
bazel-out | ||
bazel-testlogs | ||
# python | ||
*.pyc | ||
|
||
# Visual Studio files | ||
.vs | ||
*.sdf | ||
*.opensdf | ||
*.VC.opendb | ||
*.suo | ||
*.user | ||
_ReSharper.Caches/ | ||
Win32-Debug/ | ||
Win32-Release/ | ||
x64-Debug/ | ||
x64-Release/ | ||
|
||
# Ignore autoconf / automake files | ||
Makefile.in | ||
aclocal.m4 | ||
configure | ||
build-aux/ | ||
autom4te.cache/ | ||
googletest/m4/libtool.m4 | ||
googletest/m4/ltoptions.m4 | ||
googletest/m4/ltsugar.m4 | ||
googletest/m4/ltversion.m4 | ||
googletest/m4/lt~obsolete.m4 | ||
googlemock/m4 | ||
|
||
# Ignore generated directories. | ||
googlemock/fused-src/ | ||
googletest/fused-src/ | ||
|
||
# macOS files | ||
.DS_Store | ||
googletest/.DS_Store | ||
googletest/xcode/.DS_Store | ||
|
||
# Ignore cmake generated directories and files. | ||
CMakeFiles | ||
CTestTestfile.cmake | ||
Makefile | ||
cmake_install.cmake | ||
googlemock/CMakeFiles | ||
googlemock/CTestTestfile.cmake | ||
googlemock/Makefile | ||
googlemock/cmake_install.cmake | ||
googlemock/gtest | ||
/bin | ||
/googlemock/gmock.dir | ||
/googlemock/gmock_main.dir | ||
/googlemock/RUN_TESTS.vcxproj.filters | ||
/googlemock/RUN_TESTS.vcxproj | ||
/googlemock/INSTALL.vcxproj.filters | ||
/googlemock/INSTALL.vcxproj | ||
/googlemock/gmock_main.vcxproj.filters | ||
/googlemock/gmock_main.vcxproj | ||
/googlemock/gmock.vcxproj.filters | ||
/googlemock/gmock.vcxproj | ||
/googlemock/gmock.sln | ||
/googlemock/ALL_BUILD.vcxproj.filters | ||
/googlemock/ALL_BUILD.vcxproj | ||
/lib | ||
/Win32 | ||
/ZERO_CHECK.vcxproj.filters | ||
/ZERO_CHECK.vcxproj | ||
/RUN_TESTS.vcxproj.filters | ||
/RUN_TESTS.vcxproj | ||
/INSTALL.vcxproj.filters | ||
/INSTALL.vcxproj | ||
/googletest-distribution.sln | ||
/CMakeCache.txt | ||
/ALL_BUILD.vcxproj.filters | ||
/ALL_BUILD.vcxproj |
Oops, something went wrong.