Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into feature/glob_loadscene
Browse files Browse the repository at this point in the history
  • Loading branch information
nowsprinting committed Apr 28, 2024
2 parents 772682a + eebba86 commit 55b291d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,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
3 changes: 2 additions & 1 deletion RuntimeInternals/ScreenshotHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ private static string DefaultFilename(string callerMemberName)
return TestContext.CurrentTestExecutionContext.CurrentTest.Name
.Replace('(', '_')
.Replace(')', '_')
.Replace(',', '-');
.Replace(',', '-')
.Replace("\"", "");
// Note: Same as the file name created under ActualImages of the Graphics Tests Framework package.
#else
return callerMemberName;
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
}
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.nowsprinting.test-helper",
"description": "Provides custom attributes, comparers, and constraints useful for testing with Unity Test Framework.",
"version": "0.5.0",
"version": "0.5.1",
"author": "Koji Hasegawa <hasegawa@hubsys.co.jp> (https://github.com/nowsprinting)",
"category": "Unity Test Framework",
"changelogUrl": "https://github.com/nowsprinting/test-helper/releases",
Expand All @@ -11,24 +11,24 @@
"displayName": "Test Helper",
"documentationUrl": "https://github.com/nowsprinting/test-helper/blob/master/README.md",
"files": [
"Documentation~",
"Editor",
"Editor*",
"Runtime",
"Runtime*",
"RuntimeInternals",
"RuntimeInternals*",
"Tests",
"Tests*",
"Documentation~/",
"Editor/",
"Editor.meta",
"Runtime/",
"Runtime.meta",
"RuntimeInternals/",
"RuntimeInternals.meta",
"Tests/",
"Tests.meta",
"LICENSE.md*",
"package.json*",
"README.md*"
],
"keywords": [
"TestFramework",
"unit testing",
"integration testing",
"test"
"test",
"unit testing"
],
"license": "MIT",
"licensesUrl": "https://github.com/nowsprinting/test-helper/blob/master/LICENSE.md",
Expand Down

0 comments on commit 55b291d

Please sign in to comment.