Skip to content

Commit 9b9f4b2

Browse files
committed
#36 Removing implicit usings from all tests
1 parent a857328 commit 9b9f4b2

34 files changed

Lines changed: 93 additions & 56 deletions

CustomGeneratorTests/CustomGeneratorTests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<LangVersion>preview</LangVersion>
4-
<ImplicitUsings>enable</ImplicitUsings>
54
<TargetFramework>netstandard2.0</TargetFramework>
65
<PreserveCompilationContext>true</PreserveCompilationContext>
76
</PropertyGroup>

CustomGeneratorTests/MyClassAttribute.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
namespace CustomGeneratorTests
1+
using System;
2+
3+
namespace CustomGeneratorTests
24
{
35
[AttributeUsage(AttributeTargets.Class)]
46
public class MyClassAttribute : Attribute { }

CustomGeneratorTests/MyClassAttributeGenerator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using GodotSharp.SourceGenerators;
1+
using System.Collections.Generic;
2+
using GodotSharp.SourceGenerators;
23
using Microsoft.CodeAnalysis;
34
using Microsoft.CodeAnalysis.Diagnostics;
45

CustomGeneratorTests/MyMethodAttribute.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
namespace CustomGeneratorTests
1+
using System;
2+
3+
namespace CustomGeneratorTests
24
{
35
[AttributeUsage(AttributeTargets.Method)]
46
public class MyMethodAttribute : Attribute { }

CustomGeneratorTests/MyMethodAttributeGenerator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using GodotSharp.SourceGenerators;
1+
using System.Collections.Generic;
2+
using GodotSharp.SourceGenerators;
23
using Microsoft.CodeAnalysis;
34
using Microsoft.CodeAnalysis.Diagnostics;
45

Godot 3.5 Tests/CustomGeneratorTests/MyTestClass.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using CustomGeneratorTests;
1+
using System.Collections.Generic;
2+
using CustomGeneratorTests;
23

34
namespace GodotTests.CustomGeneratorTests
45
{

Godot 3.5 Tests/CustomGeneratorTests/MyTestClassWithNoNamespaceAndSameName.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using CustomGeneratorTests;
1+
using System.Collections.Generic;
2+
using CustomGeneratorTests;
23

34
[MyClass]
45
public partial class MyTestClass<T1>

Godot 3.5 Tests/Godot 3.5 Tests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Project Sdk="Godot.NET.Sdk/3.3.0">
22
<PropertyGroup>
33
<LangVersion>preview</LangVersion>
4-
<ImplicitUsings>enable</ImplicitUsings>
54
<TargetFramework>netstandard2.1</TargetFramework>
65
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
76
</PropertyGroup>

Godot 3.5 Tests/RootScene.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Linq;
12
using FluentAssertions;
23
using Godot;
34
using GodotSharp.BuildingBlocks.TestRunner;

Godot 3.5 Tests/Run.cs

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,53 @@
1+
using System;
2+
using System.Collections.Generic;
13
using Godot;
24
using GodotSharp.BuildingBlocks.TestRunner;
35
using GodotTests.TestScenes;
46
using GodotTests.TestScenes.SeparateScriptNamespace;
57

68
namespace GodotTests
79
{
8-
[SceneTree]
9-
public abstract partial class Run : Control
10-
{
11-
private static IEnumerable<Func<ITest>> Tests
12-
{
13-
get
14-
{
15-
yield return ITest.GetTest<AmbiguousTypeWithImplicitUsings>;
16-
yield return ITest.GetTest<CachedNodes>;
17-
yield return ITest.GetTest<EditableChildrenTest>;
18-
yield return ITest.GetTest<EditableChildrenWithTraversalTest>;
19-
yield return ITest.GetTest<EmptyScene>;
20-
yield return ITest.GetTest<EmptySceneWithNoNamespace>;
21-
yield return ITest.GetTest<GenericRootTest>;
22-
yield return ITest.GetTest<GodotNotifyTests>;
23-
yield return ITest.GetTest<GodotOverrideInheritanceTest>;
24-
yield return ITest.GetTest<GodotOverrideTest>;
25-
yield return ITest.GetTest<ImplicitConversionTests>;
26-
yield return ITest.GetTest<InheritedScene>;
27-
yield return ITest.GetTest<InheritedSceneWithBaseChanges1>;
28-
yield return ITest.GetTest<InheritedSceneWithBaseChanges2>;
29-
yield return ITest.GetTest<InheritedSceneWithInstancedScene>;
30-
yield return ITest.GetTest<InheritingSceneWithoutScript>;
31-
yield return ITest.GetTest<InstancedScene>;
32-
yield return ITest.GetTest<InstancedSceneFromDifferentNamespace>;
33-
yield return ITest.GetTest<InstancingSceneWithoutScript>;
34-
yield return ITest.GetTest<InstantiateTests>;
35-
yield return ITest.GetTest<LoadAsPlaceholderTest>;
36-
yield return ITest.GetTest<PathTooLongError>;
37-
yield return ITest.GetTest<RootScene>;
38-
yield return ITest.GetTest<RootSceneWithNoNamespace>;
39-
yield return ITest.GetTest<SameNameTest>;
40-
yield return ITest.GetTest<ScriptForSceneWithDifferentName>;
41-
yield return ITest.GetTest<ScriptForSceneWithDifferentPath>;
42-
yield return ITest.GetTest<TraverseInstancedScene>;
43-
yield return ITest.GetTest<UniqueSceneNameAccessTest>;
44-
}
45-
}
10+
[SceneTree]
11+
public abstract partial class Run : Control
12+
{
13+
private static IEnumerable<Func<ITest>> Tests
14+
{
15+
get
16+
{
17+
yield return ITest.GetTest<AmbiguousTypeWithImplicitUsings>;
18+
yield return ITest.GetTest<CachedNodes>;
19+
yield return ITest.GetTest<EditableChildrenTest>;
20+
yield return ITest.GetTest<EditableChildrenWithTraversalTest>;
21+
yield return ITest.GetTest<EmptyScene>;
22+
yield return ITest.GetTest<EmptySceneWithNoNamespace>;
23+
yield return ITest.GetTest<GenericRootTest>;
24+
yield return ITest.GetTest<GodotNotifyTests>;
25+
yield return ITest.GetTest<GodotOverrideInheritanceTest>;
26+
yield return ITest.GetTest<GodotOverrideTest>;
27+
yield return ITest.GetTest<ImplicitConversionTests>;
28+
yield return ITest.GetTest<InheritedScene>;
29+
yield return ITest.GetTest<InheritedSceneWithBaseChanges1>;
30+
yield return ITest.GetTest<InheritedSceneWithBaseChanges2>;
31+
yield return ITest.GetTest<InheritedSceneWithInstancedScene>;
32+
yield return ITest.GetTest<InheritingSceneWithoutScript>;
33+
yield return ITest.GetTest<InstancedScene>;
34+
yield return ITest.GetTest<InstancedSceneFromDifferentNamespace>;
35+
yield return ITest.GetTest<InstancingSceneWithoutScript>;
36+
yield return ITest.GetTest<InstantiateTests>;
37+
yield return ITest.GetTest<LoadAsPlaceholderTest>;
38+
yield return ITest.GetTest<PathTooLongError>;
39+
yield return ITest.GetTest<RootScene>;
40+
yield return ITest.GetTest<RootSceneWithNoNamespace>;
41+
yield return ITest.GetTest<SameNameTest>;
42+
yield return ITest.GetTest<ScriptForSceneWithDifferentName>;
43+
yield return ITest.GetTest<ScriptForSceneWithDifferentPath>;
44+
yield return ITest.GetTest<TraverseInstancedScene>;
45+
yield return ITest.GetTest<UniqueSceneNameAccessTest>;
46+
}
47+
}
4648

47-
[GodotOverride]
48-
public void OnReady()
49-
=> _.TestRunner.Initialise(Tests);
50-
}
49+
[GodotOverride]
50+
public void OnReady()
51+
=> _.TestRunner.Initialise(Tests);
52+
}
5153
}

0 commit comments

Comments
 (0)