Basic test runner
This commit is contained in:
parent
a0edcab26d
commit
b9a582caf4
3 changed files with 24 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
Import('env')
|
Import('env')
|
||||||
|
Import('build_env')
|
||||||
|
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
|
@ -23,6 +24,8 @@ objs = []
|
||||||
for f in files:
|
for f in files:
|
||||||
objs.append(env.Object(f))
|
objs.append(env.Object(f))
|
||||||
|
|
||||||
env.Append(CPPPATH=[Dir('include').srcnode()])
|
include_dir = Dir('include').srcnode()
|
||||||
|
env.Append(CPPPATH=[include_dir])
|
||||||
|
build_env.Append(CPPPATH=[include_dir])
|
||||||
|
|
||||||
gtest = env.Library('gtest', objs)
|
gtest = env.Library('gtest', objs)
|
||||||
|
|
|
@ -18,8 +18,12 @@ for d in subdirs:
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
# TODO: Put files here.
|
# TODO: Put files here.
|
||||||
|
'main.cc',
|
||||||
]
|
]
|
||||||
|
|
||||||
objs = []
|
objs = []
|
||||||
for f in files:
|
for f in files:
|
||||||
objs.append(env.Object(f))
|
objs.append(env.Object(f))
|
||||||
|
|
||||||
|
# TODO: Add the library target for the package to test to LIBS.
|
||||||
|
env.Program('test', objs, LIBS=['gtest'])
|
||||||
|
|
16
test/main.cc
Normal file
16
test/main.cc
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
/* main.cc
|
||||||
|
* Eryn Wells <eryn@erynwells.me>>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Basic driver for unit tests. */
|
||||||
|
|
||||||
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc,
|
||||||
|
char *argv[])
|
||||||
|
{
|
||||||
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
|
return RUN_ALL_TESTS();
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue