diff --git a/addons/gdUnit3/bin/GdUnitCmdTool.gd b/addons/gdUnit3/bin/GdUnitCmdTool.gd index 46e5838e..d3e6c57e 100644 --- a/addons/gdUnit3/bin/GdUnitCmdTool.gd +++ b/addons/gdUnit3/bin/GdUnitCmdTool.gd @@ -53,7 +53,7 @@ class CLIRunner extends Node: _executor.fail_fast(true) if GdUnitTools.is_mono_supported(): - _cs_executor = load("res://addons/gdUnit3/src/core/execution/Executor.cs").new() + _cs_executor = load("res://addons/gdUnit3/mono/src/core/execution/Executor.cs").new() _cs_executor.AddGdTestEventListener(self) var err := _executor.connect("send_event", self, "_on_executor_event") @@ -273,7 +273,9 @@ class CLIRunner extends Node: var report_path := _report.write() _report.delete_history(_report_max) JUnitXmlReport.new(_report._report_path, _report.iteration(), _rtf).write(_report) - _console.prints_color("Total time %s" % LocalTime.elapsed(_report.duration()), Color.darksalmon) + _console.prints_color("Total test suites: %s" % _report.suite_count(), Color.darksalmon) + _console.prints_color("Total test cases: %s" % _report.test_count(), Color.darksalmon) + _console.prints_color("Total time: %s" % LocalTime.elapsed(_report.duration()), Color.darksalmon) _console.prints_color("Open Report at: file://%s" % report_path, Color.cornflower) GdUnitEvent.TESTSUITE_BEFORE: diff --git a/addons/gdUnit3/src/Assertions.cs b/addons/gdUnit3/mono/src/Assertions.cs similarity index 100% rename from addons/gdUnit3/src/Assertions.cs rename to addons/gdUnit3/mono/src/Assertions.cs diff --git a/addons/gdUnit3/src/IArrayAssert.cs b/addons/gdUnit3/mono/src/IArrayAssert.cs similarity index 100% rename from addons/gdUnit3/src/IArrayAssert.cs rename to addons/gdUnit3/mono/src/IArrayAssert.cs diff --git a/addons/gdUnit3/src/IAssert.cs b/addons/gdUnit3/mono/src/IAssert.cs similarity index 100% rename from addons/gdUnit3/src/IAssert.cs rename to addons/gdUnit3/mono/src/IAssert.cs diff --git a/addons/gdUnit3/src/IBoolAssert.cs b/addons/gdUnit3/mono/src/IBoolAssert.cs similarity index 100% rename from addons/gdUnit3/src/IBoolAssert.cs rename to addons/gdUnit3/mono/src/IBoolAssert.cs diff --git a/addons/gdUnit3/src/IDoubleAssert.cs b/addons/gdUnit3/mono/src/IDoubleAssert.cs similarity index 100% rename from addons/gdUnit3/src/IDoubleAssert.cs rename to addons/gdUnit3/mono/src/IDoubleAssert.cs diff --git a/addons/gdUnit3/src/IExceptionAssert.cs b/addons/gdUnit3/mono/src/IExceptionAssert.cs similarity index 100% rename from addons/gdUnit3/src/IExceptionAssert.cs rename to addons/gdUnit3/mono/src/IExceptionAssert.cs diff --git a/addons/gdUnit3/src/IIntAssert.cs b/addons/gdUnit3/mono/src/IIntAssert.cs similarity index 100% rename from addons/gdUnit3/src/IIntAssert.cs rename to addons/gdUnit3/mono/src/IIntAssert.cs diff --git a/addons/gdUnit3/src/INumberAssert.cs b/addons/gdUnit3/mono/src/INumberAssert.cs similarity index 100% rename from addons/gdUnit3/src/INumberAssert.cs rename to addons/gdUnit3/mono/src/INumberAssert.cs diff --git a/addons/gdUnit3/src/IObjectAssert.cs b/addons/gdUnit3/mono/src/IObjectAssert.cs similarity index 100% rename from addons/gdUnit3/src/IObjectAssert.cs rename to addons/gdUnit3/mono/src/IObjectAssert.cs diff --git a/addons/gdUnit3/src/ISceneRunner.cs b/addons/gdUnit3/mono/src/ISceneRunner.cs similarity index 100% rename from addons/gdUnit3/src/ISceneRunner.cs rename to addons/gdUnit3/mono/src/ISceneRunner.cs diff --git a/addons/gdUnit3/src/IStringAssert.cs b/addons/gdUnit3/mono/src/IStringAssert.cs similarity index 100% rename from addons/gdUnit3/src/IStringAssert.cs rename to addons/gdUnit3/mono/src/IStringAssert.cs diff --git a/addons/gdUnit3/src/ITuple.cs b/addons/gdUnit3/mono/src/ITuple.cs similarity index 100% rename from addons/gdUnit3/src/ITuple.cs rename to addons/gdUnit3/mono/src/ITuple.cs diff --git a/addons/gdUnit3/src/IValueExtractor.cs b/addons/gdUnit3/mono/src/IValueExtractor.cs similarity index 100% rename from addons/gdUnit3/src/IValueExtractor.cs rename to addons/gdUnit3/mono/src/IValueExtractor.cs diff --git a/addons/gdUnit3/src/Utils.cs b/addons/gdUnit3/mono/src/Utils.cs similarity index 100% rename from addons/gdUnit3/src/Utils.cs rename to addons/gdUnit3/mono/src/Utils.cs diff --git a/addons/gdUnit3/src/asserts/ArrayAssert.cs b/addons/gdUnit3/mono/src/asserts/ArrayAssert.cs similarity index 100% rename from addons/gdUnit3/src/asserts/ArrayAssert.cs rename to addons/gdUnit3/mono/src/asserts/ArrayAssert.cs diff --git a/addons/gdUnit3/src/asserts/AssertBase.cs b/addons/gdUnit3/mono/src/asserts/AssertBase.cs similarity index 100% rename from addons/gdUnit3/src/asserts/AssertBase.cs rename to addons/gdUnit3/mono/src/asserts/AssertBase.cs diff --git a/addons/gdUnit3/src/asserts/AssertFailures.cs b/addons/gdUnit3/mono/src/asserts/AssertFailures.cs similarity index 100% rename from addons/gdUnit3/src/asserts/AssertFailures.cs rename to addons/gdUnit3/mono/src/asserts/AssertFailures.cs diff --git a/addons/gdUnit3/src/asserts/BoolAssert.cs b/addons/gdUnit3/mono/src/asserts/BoolAssert.cs similarity index 100% rename from addons/gdUnit3/src/asserts/BoolAssert.cs rename to addons/gdUnit3/mono/src/asserts/BoolAssert.cs diff --git a/addons/gdUnit3/src/asserts/Comparable.cs b/addons/gdUnit3/mono/src/asserts/Comparable.cs similarity index 100% rename from addons/gdUnit3/src/asserts/Comparable.cs rename to addons/gdUnit3/mono/src/asserts/Comparable.cs diff --git a/addons/gdUnit3/src/asserts/DoubleAssert.cs b/addons/gdUnit3/mono/src/asserts/DoubleAssert.cs similarity index 100% rename from addons/gdUnit3/src/asserts/DoubleAssert.cs rename to addons/gdUnit3/mono/src/asserts/DoubleAssert.cs diff --git a/addons/gdUnit3/src/asserts/ExceptionAssert.cs b/addons/gdUnit3/mono/src/asserts/ExceptionAssert.cs similarity index 100% rename from addons/gdUnit3/src/asserts/ExceptionAssert.cs rename to addons/gdUnit3/mono/src/asserts/ExceptionAssert.cs diff --git a/addons/gdUnit3/src/asserts/IntAssert.cs b/addons/gdUnit3/mono/src/asserts/IntAssert.cs similarity index 100% rename from addons/gdUnit3/src/asserts/IntAssert.cs rename to addons/gdUnit3/mono/src/asserts/IntAssert.cs diff --git a/addons/gdUnit3/src/asserts/NumberAssert.cs b/addons/gdUnit3/mono/src/asserts/NumberAssert.cs similarity index 100% rename from addons/gdUnit3/src/asserts/NumberAssert.cs rename to addons/gdUnit3/mono/src/asserts/NumberAssert.cs diff --git a/addons/gdUnit3/src/asserts/ObjectAssert.cs b/addons/gdUnit3/mono/src/asserts/ObjectAssert.cs similarity index 100% rename from addons/gdUnit3/src/asserts/ObjectAssert.cs rename to addons/gdUnit3/mono/src/asserts/ObjectAssert.cs diff --git a/addons/gdUnit3/src/asserts/StringAssert.cs b/addons/gdUnit3/mono/src/asserts/StringAssert.cs similarity index 100% rename from addons/gdUnit3/src/asserts/StringAssert.cs rename to addons/gdUnit3/mono/src/asserts/StringAssert.cs diff --git a/addons/gdUnit3/src/core/CsTools.cs b/addons/gdUnit3/mono/src/core/CsTools.cs similarity index 100% rename from addons/gdUnit3/src/core/CsTools.cs rename to addons/gdUnit3/mono/src/core/CsTools.cs diff --git a/addons/gdUnit3/src/core/GdUnitTestSuiteBuilder.cs b/addons/gdUnit3/mono/src/core/GdUnitTestSuiteBuilder.cs similarity index 100% rename from addons/gdUnit3/src/core/GdUnitTestSuiteBuilder.cs rename to addons/gdUnit3/mono/src/core/GdUnitTestSuiteBuilder.cs diff --git a/addons/gdUnit3/src/core/SceneRunner.cs b/addons/gdUnit3/mono/src/core/SceneRunner.cs similarity index 100% rename from addons/gdUnit3/src/core/SceneRunner.cs rename to addons/gdUnit3/mono/src/core/SceneRunner.cs diff --git a/addons/gdUnit3/src/core/attributes/FuzzerAttribute.cs b/addons/gdUnit3/mono/src/core/attributes/FuzzerAttribute.cs similarity index 100% rename from addons/gdUnit3/src/core/attributes/FuzzerAttribute.cs rename to addons/gdUnit3/mono/src/core/attributes/FuzzerAttribute.cs diff --git a/addons/gdUnit3/src/core/attributes/TestCaseAttributes.cs b/addons/gdUnit3/mono/src/core/attributes/TestCaseAttributes.cs similarity index 100% rename from addons/gdUnit3/src/core/attributes/TestCaseAttributes.cs rename to addons/gdUnit3/mono/src/core/attributes/TestCaseAttributes.cs diff --git a/addons/gdUnit3/src/core/attributes/TestStageAttribute.cs b/addons/gdUnit3/mono/src/core/attributes/TestStageAttribute.cs similarity index 100% rename from addons/gdUnit3/src/core/attributes/TestStageAttribute.cs rename to addons/gdUnit3/mono/src/core/attributes/TestStageAttribute.cs diff --git a/addons/gdUnit3/src/core/attributes/TestSuiteAttribute.cs b/addons/gdUnit3/mono/src/core/attributes/TestSuiteAttribute.cs similarity index 100% rename from addons/gdUnit3/src/core/attributes/TestSuiteAttribute.cs rename to addons/gdUnit3/mono/src/core/attributes/TestSuiteAttribute.cs diff --git a/addons/gdUnit3/src/core/data/IValueProvider.cs b/addons/gdUnit3/mono/src/core/data/IValueProvider.cs similarity index 100% rename from addons/gdUnit3/src/core/data/IValueProvider.cs rename to addons/gdUnit3/mono/src/core/data/IValueProvider.cs diff --git a/addons/gdUnit3/src/core/event/TestEvent.cs b/addons/gdUnit3/mono/src/core/event/TestEvent.cs similarity index 100% rename from addons/gdUnit3/src/core/event/TestEvent.cs rename to addons/gdUnit3/mono/src/core/event/TestEvent.cs diff --git a/addons/gdUnit3/src/core/event/TestEventListener.cs b/addons/gdUnit3/mono/src/core/event/TestEventListener.cs similarity index 100% rename from addons/gdUnit3/src/core/event/TestEventListener.cs rename to addons/gdUnit3/mono/src/core/event/TestEventListener.cs diff --git a/addons/gdUnit3/src/core/execution/AfterExecutionStage.cs b/addons/gdUnit3/mono/src/core/execution/AfterExecutionStage.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/AfterExecutionStage.cs rename to addons/gdUnit3/mono/src/core/execution/AfterExecutionStage.cs diff --git a/addons/gdUnit3/src/core/execution/AfterTestExecutionStage.cs b/addons/gdUnit3/mono/src/core/execution/AfterTestExecutionStage.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/AfterTestExecutionStage.cs rename to addons/gdUnit3/mono/src/core/execution/AfterTestExecutionStage.cs diff --git a/addons/gdUnit3/src/core/execution/BeforeExecutionStage.cs b/addons/gdUnit3/mono/src/core/execution/BeforeExecutionStage.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/BeforeExecutionStage.cs rename to addons/gdUnit3/mono/src/core/execution/BeforeExecutionStage.cs diff --git a/addons/gdUnit3/src/core/execution/BeforeTestExecutionStage.cs b/addons/gdUnit3/mono/src/core/execution/BeforeTestExecutionStage.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/BeforeTestExecutionStage.cs rename to addons/gdUnit3/mono/src/core/execution/BeforeTestExecutionStage.cs diff --git a/addons/gdUnit3/src/core/execution/ExecutionContext.cs b/addons/gdUnit3/mono/src/core/execution/ExecutionContext.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/ExecutionContext.cs rename to addons/gdUnit3/mono/src/core/execution/ExecutionContext.cs diff --git a/addons/gdUnit3/src/core/execution/ExecutionStage.cs b/addons/gdUnit3/mono/src/core/execution/ExecutionStage.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/ExecutionStage.cs rename to addons/gdUnit3/mono/src/core/execution/ExecutionStage.cs diff --git a/addons/gdUnit3/src/core/execution/ExecutionTimeoutException.cs b/addons/gdUnit3/mono/src/core/execution/ExecutionTimeoutException.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/ExecutionTimeoutException.cs rename to addons/gdUnit3/mono/src/core/execution/ExecutionTimeoutException.cs diff --git a/addons/gdUnit3/src/core/execution/Executor.cs b/addons/gdUnit3/mono/src/core/execution/Executor.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/Executor.cs rename to addons/gdUnit3/mono/src/core/execution/Executor.cs diff --git a/addons/gdUnit3/src/core/execution/IExecutionStage.cs b/addons/gdUnit3/mono/src/core/execution/IExecutionStage.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/IExecutionStage.cs rename to addons/gdUnit3/mono/src/core/execution/IExecutionStage.cs diff --git a/addons/gdUnit3/src/core/execution/TestCase.cs b/addons/gdUnit3/mono/src/core/execution/TestCase.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/TestCase.cs rename to addons/gdUnit3/mono/src/core/execution/TestCase.cs diff --git a/addons/gdUnit3/src/core/execution/TestCaseExecutionStage.cs b/addons/gdUnit3/mono/src/core/execution/TestCaseExecutionStage.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/TestCaseExecutionStage.cs rename to addons/gdUnit3/mono/src/core/execution/TestCaseExecutionStage.cs diff --git a/addons/gdUnit3/src/core/execution/TestFailedException.cs b/addons/gdUnit3/mono/src/core/execution/TestFailedException.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/TestFailedException.cs rename to addons/gdUnit3/mono/src/core/execution/TestFailedException.cs diff --git a/addons/gdUnit3/src/core/execution/TestSuite.cs b/addons/gdUnit3/mono/src/core/execution/TestSuite.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/TestSuite.cs rename to addons/gdUnit3/mono/src/core/execution/TestSuite.cs diff --git a/addons/gdUnit3/src/core/execution/TestSuiteExecutionStage.cs b/addons/gdUnit3/mono/src/core/execution/TestSuiteExecutionStage.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/TestSuiteExecutionStage.cs rename to addons/gdUnit3/mono/src/core/execution/TestSuiteExecutionStage.cs diff --git a/addons/gdUnit3/src/core/execution/monitor/MemoryPool.cs b/addons/gdUnit3/mono/src/core/execution/monitor/MemoryPool.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/monitor/MemoryPool.cs rename to addons/gdUnit3/mono/src/core/execution/monitor/MemoryPool.cs diff --git a/addons/gdUnit3/src/core/execution/monitor/OrphanNodesMonitor.cs b/addons/gdUnit3/mono/src/core/execution/monitor/OrphanNodesMonitor.cs similarity index 100% rename from addons/gdUnit3/src/core/execution/monitor/OrphanNodesMonitor.cs rename to addons/gdUnit3/mono/src/core/execution/monitor/OrphanNodesMonitor.cs diff --git a/addons/gdUnit3/src/core/report/TestReport.cs b/addons/gdUnit3/mono/src/core/report/TestReport.cs similarity index 100% rename from addons/gdUnit3/src/core/report/TestReport.cs rename to addons/gdUnit3/mono/src/core/report/TestReport.cs diff --git a/addons/gdUnit3/src/core/report/TestReportCollector.cs b/addons/gdUnit3/mono/src/core/report/TestReportCollector.cs similarity index 100% rename from addons/gdUnit3/src/core/report/TestReportCollector.cs rename to addons/gdUnit3/mono/src/core/report/TestReportCollector.cs diff --git a/addons/gdUnit3/src/extractors/Tuple.cs b/addons/gdUnit3/mono/src/extractors/Tuple.cs similarity index 100% rename from addons/gdUnit3/src/extractors/Tuple.cs rename to addons/gdUnit3/mono/src/extractors/Tuple.cs diff --git a/addons/gdUnit3/src/extractors/ValueExtractor.cs b/addons/gdUnit3/mono/src/extractors/ValueExtractor.cs similarity index 100% rename from addons/gdUnit3/src/extractors/ValueExtractor.cs rename to addons/gdUnit3/mono/src/extractors/ValueExtractor.cs diff --git a/addons/gdUnit3/test/AssertionsTest.cs b/addons/gdUnit3/mono/test/AssertionsTest.cs similarity index 100% rename from addons/gdUnit3/test/AssertionsTest.cs rename to addons/gdUnit3/mono/test/AssertionsTest.cs diff --git a/addons/gdUnit3/test/UtilsTest.cs b/addons/gdUnit3/mono/test/UtilsTest.cs similarity index 100% rename from addons/gdUnit3/test/UtilsTest.cs rename to addons/gdUnit3/mono/test/UtilsTest.cs diff --git a/addons/gdUnit3/test/asserts/ArrayAssertTest.cs b/addons/gdUnit3/mono/test/asserts/ArrayAssertTest.cs similarity index 100% rename from addons/gdUnit3/test/asserts/ArrayAssertTest.cs rename to addons/gdUnit3/mono/test/asserts/ArrayAssertTest.cs diff --git a/addons/gdUnit3/test/asserts/BoolAssertTest.cs b/addons/gdUnit3/mono/test/asserts/BoolAssertTest.cs similarity index 100% rename from addons/gdUnit3/test/asserts/BoolAssertTest.cs rename to addons/gdUnit3/mono/test/asserts/BoolAssertTest.cs diff --git a/addons/gdUnit3/test/asserts/IntAssertTest.cs b/addons/gdUnit3/mono/test/asserts/IntAssertTest.cs similarity index 100% rename from addons/gdUnit3/test/asserts/IntAssertTest.cs rename to addons/gdUnit3/mono/test/asserts/IntAssertTest.cs diff --git a/addons/gdUnit3/test/asserts/ObjectAssertTest.cs b/addons/gdUnit3/mono/test/asserts/ObjectAssertTest.cs similarity index 100% rename from addons/gdUnit3/test/asserts/ObjectAssertTest.cs rename to addons/gdUnit3/mono/test/asserts/ObjectAssertTest.cs diff --git a/addons/gdUnit3/test/asserts/StringAssertTest.cs b/addons/gdUnit3/mono/test/asserts/StringAssertTest.cs similarity index 100% rename from addons/gdUnit3/test/asserts/StringAssertTest.cs rename to addons/gdUnit3/mono/test/asserts/StringAssertTest.cs diff --git a/addons/gdUnit3/test/core/CsToolsTest.cs b/addons/gdUnit3/mono/test/core/CsToolsTest.cs similarity index 90% rename from addons/gdUnit3/test/core/CsToolsTest.cs rename to addons/gdUnit3/mono/test/core/CsToolsTest.cs index 6c0c4f02..d7fb8988 100644 --- a/addons/gdUnit3/test/core/CsToolsTest.cs +++ b/addons/gdUnit3/mono/test/core/CsToolsTest.cs @@ -16,7 +16,7 @@ public void CreateTestSuite() { var tmp = CreateTempDir("build-test-suite-test"); string sourceClass = Path.Combine(tmp, "TestPerson.cs"); - File.Copy(Path.GetFullPath(Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/test/core/resources/sources/TestPerson.cs")), sourceClass); + File.Copy(Path.GetFullPath(Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/mono/test/core/resources/sources/TestPerson.cs")), sourceClass); // first time generates the test suite and adds the test case string path = Path.Combine(tmp, "TestPersonTest.cs"); diff --git a/addons/gdUnit3/test/core/ExampleTestSuite.cs b/addons/gdUnit3/mono/test/core/ExampleTestSuite.cs similarity index 100% rename from addons/gdUnit3/test/core/ExampleTestSuite.cs rename to addons/gdUnit3/mono/test/core/ExampleTestSuite.cs diff --git a/addons/gdUnit3/test/core/ExecutorTest.cs b/addons/gdUnit3/mono/test/core/ExecutorTest.cs similarity index 100% rename from addons/gdUnit3/test/core/ExecutorTest.cs rename to addons/gdUnit3/mono/test/core/ExecutorTest.cs diff --git a/addons/gdUnit3/test/core/GdUnitTestSuiteBuilderTest.cs b/addons/gdUnit3/mono/test/core/GdUnitTestSuiteBuilderTest.cs similarity index 87% rename from addons/gdUnit3/test/core/GdUnitTestSuiteBuilderTest.cs rename to addons/gdUnit3/mono/test/core/GdUnitTestSuiteBuilderTest.cs index d8b9d5d6..79df5b51 100644 --- a/addons/gdUnit3/test/core/GdUnitTestSuiteBuilderTest.cs +++ b/addons/gdUnit3/mono/test/core/GdUnitTestSuiteBuilderTest.cs @@ -20,17 +20,17 @@ public void AfterEach() [TestCase] public void ParseType() { - AssertObject(GdUnitTestSuiteBuilder.ParseType("addons/gdUnit3/test/core/resources/testsuites/mono/noSpace/TestSuiteWithoutNamespace.cs")).IsEqual(typeof(TestSuiteWithoutNamespace)); - AssertObject(GdUnitTestSuiteBuilder.ParseType("addons/gdUnit3/test/core/resources/testsuites/mono/spaceA/TestSuite.cs")).IsEqual(typeof(GdUnit3.Tests.SpaceA.TestSuite)); - AssertObject(GdUnitTestSuiteBuilder.ParseType("addons/gdUnit3/test/core/resources/testsuites/mono/spaceB/TestSuite.cs")).IsEqual(typeof(GdUnit3.Tests.SpaceB.TestSuite)); + AssertObject(GdUnitTestSuiteBuilder.ParseType("addons/gdUnit3/mono/test/core/resources/testsuites/mono/noSpace/TestSuiteWithoutNamespace.cs")).IsEqual(typeof(TestSuiteWithoutNamespace)); + AssertObject(GdUnitTestSuiteBuilder.ParseType("addons/gdUnit3/mono/test/core/resources/testsuites/mono/spaceA/TestSuite.cs")).IsEqual(typeof(GdUnit3.Tests.SpaceA.TestSuite)); + AssertObject(GdUnitTestSuiteBuilder.ParseType("addons/gdUnit3/mono/test/core/resources/testsuites/mono/spaceB/TestSuite.cs")).IsEqual(typeof(GdUnit3.Tests.SpaceB.TestSuite)); // source file not exists - AssertObject(GdUnitTestSuiteBuilder.ParseType("addons/gdUnit3/test/core/resources/testsuites/mono/spaceC/TestSuite.cs")).IsNull(); + AssertObject(GdUnitTestSuiteBuilder.ParseType("addons/gdUnit3/mono/test/core/resources/testsuites/mono/spaceC/TestSuite.cs")).IsNull(); } [TestCase] public void FindMethod_LineOutOfRange() { - var classPath = Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/test/core/resources/sources/TestPerson.cs"); + var classPath = Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/mono/test/core/resources/sources/TestPerson.cs"); AssertThrown(() => GdUnitTestSuiteBuilder.FindMethod(classPath, 0)).StartsWithMessage("Specified argument was out of the range of valid values."); AssertThrown(() => GdUnitTestSuiteBuilder.FindMethod(classPath, 10000)).StartsWithMessage("Specified argument was out of the range of valid values."); } @@ -38,7 +38,7 @@ public void FindMethod_LineOutOfRange() [TestCase] public void FindMethod_NoMethodFound() { - var classPath = Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/test/core/resources/sources/TestPerson.cs"); + var classPath = Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/mono/test/core/resources/sources/TestPerson.cs"); AssertString(GdUnitTestSuiteBuilder.FindMethod(classPath, 5)).IsNull(); AssertString(GdUnitTestSuiteBuilder.FindMethod(classPath, 11)).IsNull(); } @@ -46,7 +46,7 @@ public void FindMethod_NoMethodFound() [TestCase] public void FindMethod_Found() { - var classPath = Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/test/core/resources/sources/TestPerson.cs"); + var classPath = Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/mono/test/core/resources/sources/TestPerson.cs"); AssertString(GdUnitTestSuiteBuilder.FindMethod(classPath, 14)).IsEqual("FirstName"); AssertString(GdUnitTestSuiteBuilder.FindMethod(classPath, 16)).IsEqual("LastName"); AssertString(GdUnitTestSuiteBuilder.FindMethod(classPath, 18)).IsEqual("FullName"); @@ -62,7 +62,7 @@ public void CreateTestSuite() { var tmp = CreateTempDir("build-test-suite-test"); string sourceClass = Path.Combine(tmp, "TestPerson.cs"); - File.Copy(Path.GetFullPath(Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/test/core/resources/sources/TestPerson.cs")), sourceClass); + File.Copy(Path.GetFullPath(Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/mono/test/core/resources/sources/TestPerson.cs")), sourceClass); // first time generates the test suite and adds the test case string testSuite = Path.Combine(tmp, "TestPersonTest.cs"); @@ -83,7 +83,7 @@ public void CreateTestSuite_NoMethodFound() { var tmp = CreateTempDir("build-test-suite-test"); string sourceClass = Path.Combine(tmp, "TestPerson.cs"); - File.Copy(Path.GetFullPath(Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/test/core/resources/sources/TestPerson.cs")), sourceClass); + File.Copy(Path.GetFullPath(Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/mono/test/core/resources/sources/TestPerson.cs")), sourceClass); // use of a line number for which no method is defined in the source class Dictionary dictionary = GdUnitTestSuiteBuilder.Build(sourceClass, 4, Path.Combine(tmp, "TestPersonTest.cs")); @@ -97,7 +97,7 @@ public void CreateTestSuite_NoNamespace() { var tmp = CreateTempDir("build-test-suite-test"); string sourceClass = Path.Combine(tmp, "TestPerson2.cs"); - File.Copy(Path.GetFullPath(Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/test/core/resources/sources/TestPerson2.cs")), sourceClass); + File.Copy(Path.GetFullPath(Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/mono/test/core/resources/sources/TestPerson2.cs")), sourceClass); // use of a line number for which no method is defined in the source class string testSuite = Path.Combine(tmp, "TestPerson2Test.cs"); @@ -111,7 +111,7 @@ public void CreateTestSuite_WithNamespace() { var tmp = CreateTempDir("build-test-suite-test"); string sourceClass = Path.Combine(tmp, "TestPerson.cs"); - File.Copy(Path.GetFullPath(Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/test/core/resources/sources/TestPerson.cs")), sourceClass); + File.Copy(Path.GetFullPath(Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/mono/test/core/resources/sources/TestPerson.cs")), sourceClass); // use of a line number for which no method is defined in the source class string testSuite = Path.Combine(tmp, "TestPersonTest.cs"); @@ -125,7 +125,7 @@ public void CreateTestSuite_TestCaseAlreadyExists() { var tmp = CreateTempDir("build-test-suite-test"); string sourceClass = Path.Combine(tmp, "TestPerson.cs"); - File.Copy(Path.GetFullPath(Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/test/core/resources/sources/TestPerson.cs")), sourceClass); + File.Copy(Path.GetFullPath(Godot.ProjectSettings.GlobalizePath("res://addons/gdUnit3/mono/test/core/resources/sources/TestPerson.cs")), sourceClass); string expected = NewCreatedTestSuite(sourceClass); diff --git a/addons/gdUnit3/test/core/SceneRunnerTest.cs b/addons/gdUnit3/mono/test/core/SceneRunnerTest.cs similarity index 100% rename from addons/gdUnit3/test/core/SceneRunnerTest.cs rename to addons/gdUnit3/mono/test/core/SceneRunnerTest.cs diff --git a/addons/gdUnit3/test/core/resources/sources/TestPerson.cs b/addons/gdUnit3/mono/test/core/resources/sources/TestPerson.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/sources/TestPerson.cs rename to addons/gdUnit3/mono/test/core/resources/sources/TestPerson.cs diff --git a/addons/gdUnit3/test/core/resources/sources/TestPerson2.cs b/addons/gdUnit3/mono/test/core/resources/sources/TestPerson2.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/sources/TestPerson2.cs rename to addons/gdUnit3/mono/test/core/resources/sources/TestPerson2.cs diff --git a/addons/gdUnit3/test/core/resources/testsuites/mono/ExampleTestSuiteA.cs b/addons/gdUnit3/mono/test/core/resources/testsuites/mono/ExampleTestSuiteA.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/testsuites/mono/ExampleTestSuiteA.cs rename to addons/gdUnit3/mono/test/core/resources/testsuites/mono/ExampleTestSuiteA.cs diff --git a/addons/gdUnit3/test/core/resources/testsuites/mono/NotATestSuite.cs b/addons/gdUnit3/mono/test/core/resources/testsuites/mono/NotATestSuite.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/testsuites/mono/NotATestSuite.cs rename to addons/gdUnit3/mono/test/core/resources/testsuites/mono/NotATestSuite.cs diff --git a/addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteAbortOnTestTimeout.cs b/addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteAbortOnTestTimeout.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteAbortOnTestTimeout.cs rename to addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteAbortOnTestTimeout.cs diff --git a/addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteAllStagesSuccess.cs b/addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteAllStagesSuccess.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteAllStagesSuccess.cs rename to addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteAllStagesSuccess.cs diff --git a/addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteFailAndOrpahnsDetected.cs b/addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteFailAndOrpahnsDetected.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteFailAndOrpahnsDetected.cs rename to addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteFailAndOrpahnsDetected.cs diff --git a/addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteFailOnMultiStages.cs b/addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteFailOnMultiStages.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteFailOnMultiStages.cs rename to addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteFailOnMultiStages.cs diff --git a/addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteFailOnStageAfter.cs b/addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteFailOnStageAfter.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteFailOnStageAfter.cs rename to addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteFailOnStageAfter.cs diff --git a/addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteFailOnStageAfterTest.cs b/addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteFailOnStageAfterTest.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteFailOnStageAfterTest.cs rename to addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteFailOnStageAfterTest.cs diff --git a/addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteFailOnStageBefore.cs b/addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteFailOnStageBefore.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteFailOnStageBefore.cs rename to addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteFailOnStageBefore.cs diff --git a/addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteFailOnStageBeforeTest.cs b/addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteFailOnStageBeforeTest.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteFailOnStageBeforeTest.cs rename to addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteFailOnStageBeforeTest.cs diff --git a/addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteFailOnTestCase1.cs b/addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteFailOnTestCase1.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/testsuites/mono/TestSuiteFailOnTestCase1.cs rename to addons/gdUnit3/mono/test/core/resources/testsuites/mono/TestSuiteFailOnTestCase1.cs diff --git a/addons/gdUnit3/test/core/resources/testsuites/mono/noSpace/TestSuiteWithoutNamespace.cs b/addons/gdUnit3/mono/test/core/resources/testsuites/mono/noSpace/TestSuiteWithoutNamespace.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/testsuites/mono/noSpace/TestSuiteWithoutNamespace.cs rename to addons/gdUnit3/mono/test/core/resources/testsuites/mono/noSpace/TestSuiteWithoutNamespace.cs diff --git a/addons/gdUnit3/test/core/resources/testsuites/mono/spaceA/TestSuite.cs b/addons/gdUnit3/mono/test/core/resources/testsuites/mono/spaceA/TestSuite.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/testsuites/mono/spaceA/TestSuite.cs rename to addons/gdUnit3/mono/test/core/resources/testsuites/mono/spaceA/TestSuite.cs diff --git a/addons/gdUnit3/test/core/resources/testsuites/mono/spaceB/TestSuite.cs b/addons/gdUnit3/mono/test/core/resources/testsuites/mono/spaceB/TestSuite.cs similarity index 100% rename from addons/gdUnit3/test/core/resources/testsuites/mono/spaceB/TestSuite.cs rename to addons/gdUnit3/mono/test/core/resources/testsuites/mono/spaceB/TestSuite.cs diff --git a/addons/gdUnit3/test/extractors/ValueExtractorTest.cs b/addons/gdUnit3/mono/test/extractors/ValueExtractorTest.cs similarity index 100% rename from addons/gdUnit3/test/extractors/ValueExtractorTest.cs rename to addons/gdUnit3/mono/test/extractors/ValueExtractorTest.cs diff --git a/addons/gdUnit3/src/core/GdObjects.gd b/addons/gdUnit3/src/core/GdObjects.gd index 02b91e4f..0e3ce3a3 100644 --- a/addons/gdUnit3/src/core/GdObjects.gd +++ b/addons/gdUnit3/src/core/GdObjects.gd @@ -356,7 +356,7 @@ static func is_cs_test_suite(instance :Node) -> bool: static func is_cs_testsuite(script :Script) -> bool: if GdUnitTools.is_mono_supported(): - var csTools = load("res://addons/gdUnit3/src/core/CsTools.cs").new() + var csTools = load("res://addons/gdUnit3/mono/src/core/CsTools.cs").new() return not script.resource_path.empty() and csTools.IsTestSuite(script.resource_path) return false; diff --git a/addons/gdUnit3/src/core/GdUnitRunner.gd b/addons/gdUnit3/src/core/GdUnitRunner.gd index cb115148..2b34c87c 100644 --- a/addons/gdUnit3/src/core/GdUnitRunner.gd +++ b/addons/gdUnit3/src/core/GdUnitRunner.gd @@ -31,7 +31,7 @@ func _init(): # store current runner instance to engine meta data to can be access in as a singleton Engine.set_meta(GDUNIT_RUNNER, self) if GdUnitTools.is_mono_supported(): - _cs_executor = load("res://addons/gdUnit3/src/core/execution/Executor.cs").new() + _cs_executor = load("res://addons/gdUnit3/mono/src/core/execution/Executor.cs").new() _cs_executor.AddGdTestEventListener(self) func _ready(): diff --git a/addons/gdUnit3/src/core/GdUnitRunnerConfig.gd b/addons/gdUnit3/src/core/GdUnitRunnerConfig.gd index 8576ff49..945a722b 100644 --- a/addons/gdUnit3/src/core/GdUnitRunnerConfig.gd +++ b/addons/gdUnit3/src/core/GdUnitRunnerConfig.gd @@ -34,6 +34,7 @@ func server_port() -> int: func self_test() -> GdUnitRunnerConfig: add_test_suite("res://addons/gdUnit3/test/") + add_test_suite("res://addons/gdUnit3/mono/test/") return self func add_test_suite(resource_path :String) -> GdUnitRunnerConfig: diff --git a/addons/gdUnit3/src/core/GdUnitTestSuiteBuilder.gd b/addons/gdUnit3/src/core/GdUnitTestSuiteBuilder.gd index 623054c4..5b99de58 100644 --- a/addons/gdUnit3/src/core/GdUnitTestSuiteBuilder.gd +++ b/addons/gdUnit3/src/core/GdUnitTestSuiteBuilder.gd @@ -25,7 +25,7 @@ func create(source :Script, line_number :int) -> Result: if GdObjects.is_cs_script(source): if not GdUnitTools.is_mono_supported(): return Result.error("Can't create test. No c# support found.") - var csTools = load("res://addons/gdUnit3/src/core/CsTools.cs").new() + var csTools = load("res://addons/gdUnit3/mono/src/core/CsTools.cs").new() var result := csTools.CreateTestSuite(source.resource_path, line_number+1, test_suite_path) as Dictionary if result.has("error"): return Result.error(result.get("error")) diff --git a/addons/gdUnit3/src/core/_TestSuiteScanner.gd b/addons/gdUnit3/src/core/_TestSuiteScanner.gd index 40e038ed..4ebea2c5 100644 --- a/addons/gdUnit3/src/core/_TestSuiteScanner.gd +++ b/addons/gdUnit3/src/core/_TestSuiteScanner.gd @@ -73,7 +73,7 @@ static func _is_script_format_supported(resource_path :String) -> bool: return false func _parse_cs_test_suite(script :Script) -> Node: - var csTools = load("res://addons/gdUnit3/src/core/CsTools.cs").new() + var csTools = load("res://addons/gdUnit3/mono/src/core/CsTools.cs").new() return csTools.ParseTestSuite(script.resource_path) func _parse_test_suite(script :GDScript) -> GdUnitTestSuite: diff --git a/addons/gdUnit3/test/core/GdObjectsTest.gd b/addons/gdUnit3/test/core/GdObjectsTest.gd index 6ce96938..005498a0 100644 --- a/addons/gdUnit3/test/core/GdObjectsTest.gd +++ b/addons/gdUnit3/test/core/GdObjectsTest.gd @@ -588,8 +588,8 @@ func test_is_snake_case() -> void: func test_is_test_suite() -> void: assert_bool(GdObjects.is_test_suite(GdUnitTestResourceLoader.load_gd_script("res://addons/gdUnit3/test/core/ResultTest.gd"))).is_true() if GdUnitTools.is_mono_supported(): - assert_bool(GdObjects.is_test_suite(GdUnitTestResourceLoader.load_cs_script("res://addons/gdUnit3/test/core/ExampleTestSuite.cs"))).is_true() - assert_bool(GdObjects.is_test_suite(GdUnitTestResourceLoader.load_cs_script("res://addons/gdUnit3/test/core/resources/testsuites/mono/NotATestSuite.cs"))).is_false() + assert_bool(GdObjects.is_test_suite(GdUnitTestResourceLoader.load_cs_script("res://addons/gdUnit3/mono/test/core/ExampleTestSuite.cs"))).is_true() + assert_bool(GdObjects.is_test_suite(GdUnitTestResourceLoader.load_cs_script("res://addons/gdUnit3/mono/test/core/resources/testsuites/mono/NotATestSuite.cs"))).is_false() # currently not supported assert_bool(GdObjects.is_test_suite(NativeScript.new())).is_false() assert_bool(GdObjects.is_test_suite(PluginScript.new())).is_false() diff --git a/addons/gdUnit3/test/core/GdUnitTestSuiteBuilderTest.gd b/addons/gdUnit3/test/core/GdUnitTestSuiteBuilderTest.gd index 73343f28..412a548e 100644 --- a/addons/gdUnit3/test/core/GdUnitTestSuiteBuilderTest.gd +++ b/addons/gdUnit3/test/core/GdUnitTestSuiteBuilderTest.gd @@ -16,7 +16,7 @@ func before_test(): var result := GdUnitTools.copy_file("res://addons/gdUnit3/test/core/resources/sources/test_person.gd", temp) assert_result(result).is_success() _example_source_gd = result.value() as String - result = GdUnitTools.copy_file("res://addons/gdUnit3/test/core/resources/sources/TestPerson.cs", temp) + result = GdUnitTools.copy_file("res://addons/gdUnit3/mono/test/core/resources/sources/TestPerson.cs", temp) assert_result(result).is_success() _example_source_cs = result.value() as String _test_suite_builder = GdUnitTestSuiteBuilder.new()