Skip to content

Commit

Permalink
Merge pull request #68 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 e668229 + ed9eb55 commit 074d7a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,10 @@ public class MyTestClass

`TestHelper.RuntimeInternals` assembly can be used from the runtime code because it does not depend on test-framework.

> [!NOTE]
> The "Define Constraints" is set to `UNITY_INCLUDE_TESTS || COM_NOWSPRINTING_TEST_HELPER_ENABLE` in this 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.
#### ScreenshotHelper

`ScreenshotHelper` is a utility class to take a screenshot and save it to a file.
Expand Down
4 changes: 3 additions & 1 deletion RuntimeInternals/TestHelper.RuntimeInternals.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
}

0 comments on commit 074d7a7

Please sign in to comment.