Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor tests #16

Merged
merged 81 commits into from
Oct 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
32d5037
Fix public `this_control_block`
cschreib Sep 24, 2022
bcdaa10
Clarify error message and comments around over aligned types
cschreib Sep 24, 2022
9a1dfdd
Better encapsulation of pointer_and_deleter
cschreib Sep 25, 2022
75ef95e
Fix deleter not moved in explicit conversion contructor
cschreib Sep 25, 2022
b561cdd
Start refactor of tests
cschreib Sep 26, 2022
d43045f
Remove old tests
cschreib Sep 26, 2022
0ccb03e
Fix missing eoft check
cschreib Sep 26, 2022
7e9ac00
Update coverage code
cschreib Sep 26, 2022
4a2e8fc
Move memory_tracker implementation to C++
cschreib Oct 1, 2022
490e5cc
Added debug statements to allocation functions
cschreib Oct 1, 2022
f46a779
Added snatch
cschreib Oct 1, 2022
d1472a0
Added test filtering, verbose mode, clean up
cschreib Oct 2, 2022
4e218bd
Added TEST_CASE macro
cschreib Oct 2, 2022
8922957
Call test executable directly for speed
cschreib Oct 2, 2022
e4c19ce
Update oup.sublime-project
cschreib Oct 2, 2022
05efd61
Add test as custom target
cschreib Oct 2, 2022
375643c
Fixed returning 1 on success
cschreib Oct 2, 2022
2f9202a
Fixed incorrect command run for tests
cschreib Oct 2, 2022
19a5723
Fixed incorrect folder for code coverage
cschreib Oct 2, 2022
43c619c
Fix warnings reported by GCC
cschreib Oct 2, 2022
aaae114
Fix spurious MSVC warning
cschreib Oct 2, 2022
bd9a47f
Fixed exception description not displayed in REQUIRE_THROWS_AS
cschreib Oct 2, 2022
a343411
Use portable escape sequence for terminal colors
cschreib Oct 2, 2022
9e9b9bf
Continue porting observer tests to new framework
cschreib Oct 2, 2022
5b7c545
Copy and move assignment observer tests
cschreib Oct 2, 2022
fc14d84
Assignment from observable tests, and restructure
cschreib Oct 3, 2022
a9cfe68
Cyclic observer tests
cschreib Oct 3, 2022
fbcf58d
Started porting tests for eoft
cschreib Oct 4, 2022
e640933
Added missing include to <vector>
cschreib Oct 4, 2022
1749d36
Fix test name display for non-typed tests
cschreib Oct 8, 2022
de9ae77
Display error message for unhandled exception
cschreib Oct 8, 2022
050a2ac
Move code inside cpp for tests_common and added debug
cschreib Oct 8, 2022
cc15f2d
Added missing constexpr and std:: in memory tracker
cschreib Oct 8, 2022
f332446
Added scramble alloc
cschreib Oct 8, 2022
384233f
More tests for eoft
cschreib Oct 8, 2022
3d405be
Added fail_next_allocation object
cschreib Oct 8, 2022
e3298f4
Added make_const_observer_from_this
cschreib Oct 8, 2022
ef1905c
Added small_string
cschreib Oct 8, 2022
473ef75
Added FAIL_CHECK
cschreib Oct 8, 2022
667469e
Added CHECK_THROWS_AS
cschreib Oct 8, 2022
b74ee2b
Added REQUIRE_THROWS_MATCHES
cschreib Oct 8, 2022
6504324
Use new macros
cschreib Oct 8, 2022
a48eea0
Continue eoft tests
cschreib Oct 8, 2022
7065a4c
Clean up append for pointers
cschreib Oct 9, 2022
bd1113d
Fixed bug when serializing expression
cschreib Oct 9, 2022
0640322
Rename register_tests to register_type_tests
cschreib Oct 9, 2022
817a6d3
Added next_test_object_constructor_calls_observer_from_this
cschreib Oct 9, 2022
edc1636
More eoft tests
cschreib Oct 9, 2022
b24115e
Added observer from this in constructor
cschreib Oct 9, 2022
b36f5ec
Added custom test macros
cschreib Oct 10, 2022
0c7d057
Clean up snatch
cschreib Oct 10, 2022
16f0ed0
Fix compilation in MSVC
cschreib Oct 10, 2022
b2ef4c5
Fixed deleter not being moved in dynamic cast
cschreib Oct 10, 2022
8d678ff
Added move cast tests
cschreib Oct 10, 2022
3f23f55
Fix compilation with MSVC
cschreib Oct 11, 2022
f476e4e
Added observer cast copy tests
cschreib Oct 11, 2022
a0ac59d
Added explicit tests for make_observable_*()
cschreib Oct 11, 2022
01a54b6
Fix format specifiers
cschreib Oct 11, 2022
47d7356
Fix compilation in MSVC
cschreib Oct 11, 2022
6075b94
Update snatch
cschreib Oct 13, 2022
870bc49
Update snatch
cschreib Oct 13, 2022
358a718
Added missing noexcept
cschreib Oct 13, 2022
914f712
Fix warning in MSVC
cschreib Oct 13, 2022
5c06dcc
Switch to gcc 10
cschreib Oct 13, 2022
91db159
Enable warnings
cschreib Oct 14, 2022
b70982a
Fix warnings in Wall and Wextra for clang and gcc
cschreib Oct 14, 2022
41a829b
Fix unwanted bash expansion for MSVC build flags
cschreib Oct 14, 2022
a1140c7
Fix GCC warning about sized delete
cschreib Oct 14, 2022
bd25c88
Escape slashes for MSVC
cschreib Oct 14, 2022
6bb5564
Fix unused variable warning
cschreib Oct 14, 2022
6f64834
Move warning config to test project
cschreib Oct 14, 2022
515823e
Fixed typo in CMake script
cschreib Oct 14, 2022
80fcc4d
Disable noisy MSVC warning on constant comparison
cschreib Oct 14, 2022
aa4100a
Disable -Wparentheses warning in clang too
cschreib Oct 14, 2022
7b42f33
Removed cxxopts
cschreib Oct 16, 2022
08182b9
Fix MSVC warning macros
cschreib Oct 16, 2022
9b3bc37
Added missing include for std::optional
cschreib Oct 16, 2022
f7a979f
Removed included cxxopts
cschreib Oct 16, 2022
5c415fb
Use snatch from repo
cschreib Oct 16, 2022
dbd9434
Fix error in cmake script
cschreib Oct 16, 2022
f82e691
Update snatch
cschreib Oct 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
fail-fast: false
matrix:
platform:
- { name: Ubuntu GCC, os: ubuntu-latest, compiler: g++, arch: "64", cmakepp: "", flags: "-DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_FLAGS=--coverage"}
- { name: Ubuntu Clang, os: ubuntu-latest, compiler: clang++, arch: "64", cmakepp: "", flags: "-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=-stdlib=libc++"}
- { name: Ubuntu GCC, os: ubuntu-latest, compiler: g++, arch: "64", cmakepp: "", flags: "-DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_FLAGS='--coverage'"}
- { name: Ubuntu Clang, os: ubuntu-latest, compiler: clang++, arch: "64", cmakepp: "", flags: "-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS='-stdlib=libc++'"}
- { name: Windows 32, os: windows-latest, compiler: vs2019, arch: "32", cmakepp: "", flags: "-A Win32"}
- { name: Windows 64, os: windows-latest, compiler: vs2019, arch: "64", cmakepp: "", flags: "-A x64"}
- { name: MacOS, os: macos-latest, compiler: clang++, arch: "64", cmakepp: "", flags: ""}
- { name: WebAssembly, os: ubuntu-latest, compiler: em++, arch: "32", cmakepp: "emcmake", flags: "-DCMAKE_CXX_FLAGS=\"-s DISABLE_EXCEPTION_CATCHING=0\" -DCMAKE_CROSSCOMPILING_EMULATOR=node"}
- { name: WebAssembly, os: ubuntu-latest, compiler: em++, arch: "32", cmakepp: "emcmake", flags: "-DCMAKE_CXX_FLAGS='-s DISABLE_EXCEPTION_CATCHING=0' -DCMAKE_CROSSCOMPILING_EMULATOR=node"}
build-type:
- Release
- Debug
Expand Down Expand Up @@ -51,6 +51,14 @@ jobs:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}

# GCC 9 has a bug which prevents compilation of the testing framework, so switch to GCC 10.
- name: Setup GCC
if: matrix.platform.compiler == 'g++'
run: |
sudo apt install g++-10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
sudo update-alternatives --set gcc /usr/bin/gcc-10

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

Expand All @@ -67,11 +75,11 @@ jobs:
- name: Test
shell: bash
working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure
run: cmake --build . --config ${{matrix.build-type}} --target oup_runtime_tests_run

- name: Compute Code Coverage
if: runner.os == 'Linux' && matrix.platform.compiler == 'g++' && matrix.build-type == 'Debug'
run: |
gcov ${{github.workspace}}/build/tests/CMakeFiles/oup_tests.dir/runtime_tests.cpp.gcda
gcov ${{github.workspace}}/build/tests/CMakeFiles/oup_runtime_tests.dir/*.gcda
ls | grep '.gcov' | grep -v observable_unique_ptr | xargs -d"\n" rm
bash <(curl -s https://codecov.io/bash)
Loading