Object oriented unit testing framework
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
2out
test
test_package
.gitignore
CMakeLists.txt
CPPLINT.cfg
DEPLOY.md
LICENSE
README.md
codecov.yaml
conanfile.py
style.sh
uncrustify.conf

README.md

2out

Object oriented unit testing framework

EO badge

CircleCI codecov PDD status License

Intro

The test framework does not should be easy to use. The test framework should help to do everything right. And after that it should be easy to use. :)

Concept

This is a pseudocode (i think this is a eolang :))

object TestApp as Application:
	void run():
		TestSuite:
			TestEqual:
				mul: 2, 2
				4
			TestSkipped:
				TestEqual:
					mul: 2, 2
					5
			TestNamed:
				"3 * 3 should be equal 9"
				TestEqual:
					mul: 3, 3
					9
			TestSuite:
				TestEqual:
					plus: 2, 2
					4
				TestSafe:
					TestEqual:
						div: 1, 0
						100500
		.run()

Key moment: This is not a code. This is Object composition. At the time the composition is created, the tests do not start. Tests start in run() method.

Using

With cmake

conanfile.txt:

[generators]
cmake

[requires]
2out/0.6@dronmdf/stable

CMakeLists.txt:

INCLUDE(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()

build:

$ conan remote add mdf https://api.bintray.com/conan/mdf/2out
$ conan install ~/project --build
$ cmake ~/project
$ make