Skip to content

Commit

Permalink
enable unit-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepak Rajamohan committed Jul 30, 2021
1 parent e02e8a4 commit 8e3abad
Show file tree
Hide file tree
Showing 28 changed files with 2,109 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,9 @@
"dev:incremental": "node test",
"doc": "doxygen doc/Doxyfile",
"lint": "node tools/clang-format",
"lint:fix": "node tools/clang-format --fix"
"lint:fix": "node tools/clang-format --fix",
"preunit": "node unit-test --filter=\"$npm_config_filter\"",
"unit": "node test"
},
"pre-commit": "lint",
"version": "4.0.0",
Expand Down
45 changes: 45 additions & 0 deletions unit-test/binding.gyp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
'target_defaults': {
'includes': ['common.gypi'],
'variables': {
'sources': "<!(node -p \"process.env['files_to_run'].split(',')\")",
'build_sources': [
'../test/name.cc',
'./generated/binding.cc'
]
},
},
'targets': [
{
"target_name": "generateBindingCC",
"type": "none",
"actions": [ {
"action_name": "generateBindingCC",
"message": "Generating binding cc file",
"outputs": ["generated/binding.cc"],
"conditions": [
[ "'true'=='true'", {
"inputs": [""],
"action": [
"node",
"generate-binding-cc.js",
"<!(node -p \"process.env['files_to_compile']\")"
]
} ]
]
} ]
},
{
'target_name': 'binding',
'includes': ['../except.gypi'],
'sources': ['>@(build_sources)'],
'dependencies': [ 'generateBindingCC' ]
},
{
'target_name': 'binding_noexcept',
'includes': ['../noexcept.gypi'],
'sources': ['>@(build_sources)'],
'dependencies': [ 'generateBindingCC' ]
},
],
}
Loading

0 comments on commit 8e3abad

Please sign in to comment.