Skip to content

Commit 477e312

Browse files
committed
move test code to test/ subdir, add test project, add to package.json
1 parent 68b0400 commit 477e312

File tree

5 files changed

+26
-12
lines changed

5 files changed

+26
-12
lines changed

binding.gyp

+25-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
11
{
2-
"targets": [
2+
'targets': [
33
{
44
# unit testing library
5-
"target_name": "CppUnitLite",
6-
"type": "static_library",
7-
"sources": [
8-
"src/Failure.cpp",
9-
"src/SimpleString.cpp",
10-
"src/Test.cpp",
11-
"src/TestResult.cpp",
12-
"src/TestRegistry.cpp"
5+
'target_name': 'CppUnitLite',
6+
'type': 'static_library',
7+
'sources': [
8+
'src/Failure.cpp',
9+
'src/SimpleString.cpp',
10+
'src/Test.cpp',
11+
'src/TestResult.cpp',
12+
'src/TestRegistry.cpp'
1313
],
14-
"include_dirs": [
15-
"./CppUnitLite"
14+
'include_dirs': [
15+
'./CppUnitLite'
16+
]
17+
},
18+
{
19+
'target_name': 'test',
20+
'type': 'executable',
21+
'dependencies': [
22+
'CppUnitLite'
23+
],
24+
'sources': [
25+
'test/StackMain.cpp',
26+
'test/StackTest.cpp',
27+
],
28+
'include_dirs': [
29+
'.'
1630
]
1731
},
1832
]

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "include_dirs.js",
66
"scripts": {
77
"install": "node-gyp rebuild",
8-
"test": "echo \"Error: no test specified\" && exit 1"
8+
"test": "build/Release/test"
99
},
1010
"repository": {
1111
"type": "git",
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)