git clone https://github.com/tiagoinacio/algorithms_cpp.git --recursive
cd algorithms_cpp
mkdir build
cd build
cmake DCMAKE_BUILD_TYPE=Debug -G 'Unix Makefiles' ..
make -j 8Either using make test:
$ make test
Running tests...
Test project /home/user/algorithms_cpp/build
Start 1: unit
1/1 Test #1: unit ............................. Passed 0.00 sec
100% tests passed, 0 tests failed out of 1
Total Test time (real) = 0.00 sec
Or directly using unit_tests:
$ ./unit_tests
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from example
[ RUN ] example.add
[ OK ] example.add (0 ms)
[ RUN ] example.subtract
[ OK ] example.subtract (0 ms)
[----------] 2 tests from example (1 ms total)
[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (1 ms total)
[ PASSED ] 2 tests.
You should already have NodeJS installed. If not, you can grab it here.
git clone https://github.com/tiagoinacio/algorithms_cpp.git --recursive
cd algorithms_cpp/src/node/data-structures
npm -i -g node-gyp
node-gyp configure
node-gyp build
node linked-list.js