Skip to content

Commit

Permalink
Test Cases: Support PascalCase for Namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewDRX committed Feb 17, 2024
1 parent e58aacc commit 26f82af
Show file tree
Hide file tree
Showing 36 changed files with 248 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/tests/Define_NamespaceStyle_Default/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build
out
out-legacy-cs
intended/bin
intended/obj
6 changes: 6 additions & 0 deletions test/tests/Define_NamespaceStyle_Default/Test.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# The following are added automatically:
# -lib csharp
# --custom-target rcs=out

-main namespacestyle.default_.Main
-D namespace_style=default
7 changes: 7 additions & 0 deletions test/tests/Define_NamespaceStyle_Default/intended/HaxeBoot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Haxe {
class HaxeBoot {
static void Main(string[] args) {
namespacestyle.default_.Main_Fields_.main();
}
}
}
11 changes: 11 additions & 0 deletions test/tests/Define_NamespaceStyle_Default/intended/Main_Base.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace haxe.root {
class Base {
public virtual void func() {

}

public void func2() {

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace haxe.root {
class Child: Base {
public override void func() {

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version // 1
0//0
namespacestyle_Main.cs
build.csproj
HaxeBoot.cs
11 changes: 11 additions & 0 deletions test/tests/Define_NamespaceStyle_Default/intended/build.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<StartupObject>Haxe.HaxeBoot</StartupObject>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace namespacestyle.default_ {
class Main_Fields_ {
public static void main() {

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package namespacestyle.default_;

function main() { }
5 changes: 5 additions & 0 deletions test/tests/Define_NamespaceStyle_Pascal_FromCamel/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build
out
out-legacy-cs
intended/bin
intended/obj
6 changes: 6 additions & 0 deletions test/tests/Define_NamespaceStyle_Pascal_FromCamel/Test.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# The following are added automatically:
# -lib csharp
# --custom-target rcs=out

-main namespacestyle.pascal.fromCamel.Main
-D namespace_style=pascal
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Haxe {
class HaxeBoot {
static void Main(string[] args) {
Namespacestyle.Pascal.Main_Fields_.main();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace haxe.root {
class Base {
public virtual void func() {

}

public void func2() {

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace haxe.root {
class Child: Base {
public override void func() {

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version // 1
0//1
namespacestyle_pascal_Main.cs
build.csproj
HaxeBoot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<StartupObject>Haxe.HaxeBoot</StartupObject>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Namespacestyle.Pascal {
class Main_Fields_ {
public static void main() {

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package namespacestyle.pascal.fromCamel;

function main() { }
5 changes: 5 additions & 0 deletions test/tests/Define_NamespaceStyle_Pascal_FromSnake/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build
out
out-legacy-cs
intended/bin
intended/obj
6 changes: 6 additions & 0 deletions test/tests/Define_NamespaceStyle_Pascal_FromSnake/Test.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# The following are added automatically:
# -lib csharp
# --custom-target rcs=out

-main namespacestyle.pascal.from_snake.Main
-D namespace_style=pascal
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Haxe {
class HaxeBoot {
static void Main(string[] args) {
Namespacestyle.Pascal.FromSnake.Main_Fields_.main();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace haxe.root {
class Base {
public virtual void func() {

}

public void func2() {

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace haxe.root {
class Child: Base {
public override void func() {

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version // 1
0//0
namespacestyle_pascal_Main.cs
build.csproj
HaxeBoot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<StartupObject>Haxe.HaxeBoot</StartupObject>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Namespacestyle.Pascal.FromSnake {
class Main_Fields_ {
public static void main() {

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package namespacestyle.pascal.from_snake;

function main() { }
5 changes: 5 additions & 0 deletions test/tests/Define_NamespaceStyle_Unspecified/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build
out
out-legacy-cs
intended/bin
intended/obj
6 changes: 6 additions & 0 deletions test/tests/Define_NamespaceStyle_Unspecified/Test.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# The following are added automatically:
# -lib csharp
# --custom-target rcs=out

-main namespacestyle.unspecified.Main
-D namespace_style=default
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Haxe {
class HaxeBoot {
static void Main(string[] args) {
namespacestyle.unspecified.Main_Fields_.main();
}
}
}
11 changes: 11 additions & 0 deletions test/tests/Define_NamespaceStyle_Unspecified/intended/Main_Base.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace haxe.root {
class Base {
public virtual void func() {

}

public void func2() {

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace haxe.root {
class Child: Base {
public override void func() {

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version // 1
0//1
namespacestyle_Main.cs
build.csproj
HaxeBoot.cs
11 changes: 11 additions & 0 deletions test/tests/Define_NamespaceStyle_Unspecified/intended/build.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<StartupObject>Haxe.HaxeBoot</StartupObject>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace namespacestyle.unspecified {
class Main_Fields_ {
public static void main() {

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package namespacestyle.unspecified;

function main() { }

0 comments on commit 26f82af

Please sign in to comment.