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

Add unit testing framework and tests for existing code (and assorted fixes and breaking API changes) #23

Merged
merged 41 commits into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
59eb1ae
wip: add catch2 and 1 == 1 test case
Sophon96 Oct 2, 2023
9982c80
Merge remote-tracking branch 'upstream/main' into 8-add-start-to-test…
Sophon96 Oct 4, 2023
f09d0d8
Merge branch 'fix-ci-and-toolchain-again' into 8-add-start-to-test-suite
Sophon96 Oct 4, 2023
9ff281e
Merge branch 'fix-ci-and-toolchain-again' into 8-add-start-to-test-suite
Sophon96 Oct 4, 2023
a507df1
Merge remote-tracking branch 'upstream/main' into 8-add-start-to-test…
Sophon96 Oct 8, 2023
955b55f
chore: specify minimum meson version
Sophon96 Oct 8, 2023
6a14122
Merge remote-tracking branch 'upstream/main' into 8-add-start-to-test…
Sophon96 Oct 8, 2023
00840aa
chore: don't commit catch2 source
Sophon96 Oct 8, 2023
3a582c2
wip: add matrix multiplication test
Sophon96 Oct 8, 2023
5695673
fix: specify visibility for all symbols
Sophon96 Oct 8, 2023
f435caf
fix: add include guard
Sophon96 Oct 9, 2023
4a6bc95
Merge remote-tracking branch 'upstream/main' into use-cpp-visibility
Sophon96 Oct 9, 2023
2d7772c
feat: add cpp visibility macros to logger
Sophon96 Oct 9, 2023
f2ed54b
fix: actually define the visbility macro when building shared lib
Sophon96 Oct 9, 2023
b7eb113
fix: add missing include directives
Sophon96 Oct 9, 2023
3bf56a2
Merge branch 'use-cpp-visibility' into 8-add-start-to-test-suite
Sophon96 Oct 9, 2023
8949e53
wip: refactor meson build
Sophon96 Oct 9, 2023
42ccade
refactor: move logger.hpp to include directory to enable building
Sophon96 Oct 9, 2023
85f13ba
wip: refactor meson build but on this branch
Sophon96 Oct 9, 2023
1f3d8ad
Merge branch 'make-logger-buildable' into 8-add-start-to-test-suite
Sophon96 Oct 9, 2023
cd80cbe
fix: remove non-existent directory from includes
Sophon96 Oct 9, 2023
5c53a77
Merge branch 'make-logger-buildable' into 8-add-start-to-test-suite
Sophon96 Oct 9, 2023
da63099
Merge branch 'main' into 8-add-start-to-test-suite
Sophon96 Oct 10, 2023
8bcebcd
fix: fix some memory allocation and constructor whoopsies in matrix a…
Sophon96 Oct 10, 2023
d96d521
Merge remote-tracking branch 'origin/8-add-start-to-test-suite' into …
Sophon96 Oct 10, 2023
0ab8cad
wip: test seems to pass after refactor
Sophon96 Oct 11, 2023
aa3d72f
feat!: add getter and test for matrix
Sophon96 Oct 13, 2023
50e47d1
feat!: make getter and setter for matrix throw when oob
Sophon96 Oct 13, 2023
7046dd6
refactor: use bdd-style macros for testing matrix getters and setters
Sophon96 Oct 15, 2023
e8aef3e
tests: add tests for activation functions
Sophon96 Oct 15, 2023
6942cef
test: test jml::Vector
Sophon96 Oct 15, 2023
938d0c3
feat: enable use of any type in iterator overload for add_testing_data
Sophon96 Oct 15, 2023
ac54280
feat: add testing data getter
Sophon96 Oct 15, 2023
6f9ebb7
fix: move model implementation around so it builds and links
Sophon96 Oct 15, 2023
4cce9d8
feat: add copy constructor to Vector
Sophon96 Oct 15, 2023
81fa07a
tests: test Model
Sophon96 Oct 15, 2023
1eb57ec
docs: add information about testing
Sophon96 Oct 15, 2023
0ccdcf0
fix: add missing includes for tuple
Sophon96 Oct 15, 2023
0581f79
ci: upload testlog as artifact
Sophon96 Oct 15, 2023
82cfe78
ci: change artifact name
Sophon96 Oct 15, 2023
a358134
docs: fix md link in readme
Sophon96 Oct 15, 2023
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
5 changes: 5 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ project('jml', 'cpp',

core_inc = include_directories('core/include')

catch2_proj = subproject('catch2', default_options: {'tests': false})
catch2_dep = catch2_proj.get_variable('catch2_with_main_dep')

subdir('core')

subdir('tests')
11 changes: 11 additions & 0 deletions subprojects/catch2.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[wrap-file]
directory = Catch2-3.4.0
source_url = https://github.com/catchorg/Catch2/archive/v3.4.0.tar.gz
source_filename = Catch2-3.4.0.tar.gz
source_hash = 122928b814b75717316c71af69bd2b43387643ba076a6ec16e7882bfb2dfacbb
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/catch2_3.4.0-1/Catch2-3.4.0.tar.gz
wrapdb_version = 3.4.0-1

[provide]
catch2 = catch2_dep
catch2-with-main = catch2_with_main_dep
5 changes: 5 additions & 0 deletions tests/core.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "catch2/catch_test_macros.hpp"

TEST_CASE("Check sanity with 1 equals 1", "[useless]") {
REQUIRE(1 == 1);
}
5 changes: 5 additions & 0 deletions tests/math/matrix.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "catch2/catch_test_macros.hpp"

TEST_CASE("nothing yet", "[math]") {
REQUIRE(2 == 2);
}
Sophon96 marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 4 additions & 0 deletions tests/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
test_sources = ['core.cpp',
'math/matrix.cpp']
tests = executable('tests', test_sources, dependencies: [catch2_dep])
test('tests', tests, args: ['--reporter', 'TAP'], protocol: 'tap')
Loading