Easy way to 'Mock' C++ interface
Switch branches/tags
Nothing to show
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.
.gitignore
LICENSE
README.md
clibpp.babel
clibpp.nim
makefile
test.cpp
test.hpp

README.md

clibpp

Easy way to 'Mock' C++ interface

Outline the C++ class

namespace somelibrary:
	class(test, header: "../test.hpp"):
	    proc multiply[T](value, by: T): int
	    proc output: void {.isstatic.}
	    proc max[T](a, b: T): T
	    var fieldName, notherName: int

Use the C++ class

# Test interface
test.output()

var item: test
echo item.multiply(5, 9)
echo item.fieldName
echo item.max(2, 10)
echo item.notherName