Skip to content

Commit

Permalink
Merge pull request #118 from nowsprinting/feature/define_constraints
Browse files Browse the repository at this point in the history
Add defineConstraints for excluded from release builds
  • Loading branch information
nowsprinting authored Apr 14, 2024
2 parents d954152 + 2970e86 commit b081a65
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Annotations/TestHelper.Monkey.Annotations.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": false,
"defineConstraints": [],
"defineConstraints": [
"UNITY_INCLUDE_TESTS || COM_NOWSPRINTING_TEST_HELPER_ENABLE"
],
"versionDefines": [],
"noEngineReferences": false
}
}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,14 @@ public class MyIntegrationTest



## Use in runtime code

The "Define Constraints" is set to `UNITY_INCLUDE_TESTS || COM_NOWSPRINTING_TEST_HELPER_ENABLE` in this package's assembly definition files, so it is generally excluded from release builds.

To use the feature in release builds, add `COM_NOWSPRINTING_TEST_HELPER_ENABLE` to the "Define Symbols" at build time.



## Installation

You can choose from two typical installation methods.
Expand Down
4 changes: 3 additions & 1 deletion Runtime/TestHelper.Monkey.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": false,
"defineConstraints": [],
"defineConstraints": [
"UNITY_INCLUDE_TESTS || COM_NOWSPRINTING_TEST_HELPER_ENABLE"
],
"versionDefines": [],
"noEngineReferences": false
}

0 comments on commit b081a65

Please sign in to comment.