summaryrefslogtreecommitdiff
path: root/tests/projects
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-16 23:45:18 +0800
committerruki <[email protected]>2026-03-16 23:45:18 +0800
commitde6664486ef54cf7d3b50b45074539fb413e583c (patch)
tree6dd33b520e2317dbe93946287814f63a9c6af657 /tests/projects
parentbf997637e98558b7289e8f9b3d05b08d102bb8af (diff)
format csharp codes
Diffstat (limited to 'tests/projects')
-rw-r--r--tests/projects/csharp/console_with_runtime_json/src/Program.cs4
-rw-r--r--tests/projects/csharp/exe_with_library/src/lib/Greeter.cs7
-rw-r--r--tests/projects/csharp/multiple_library/src/libalpha/Alpha.cs7
-rw-r--r--tests/projects/csharp/multiple_library/src/libbeta/Beta.cs7
4 files changed, 7 insertions, 18 deletions
diff --git a/tests/projects/csharp/console_with_runtime_json/src/Program.cs b/tests/projects/csharp/console_with_runtime_json/src/Program.cs
index 2c9b0783b..690faf873 100644
--- a/tests/projects/csharp/console_with_runtime_json/src/Program.cs
+++ b/tests/projects/csharp/console_with_runtime_json/src/Program.cs
@@ -1,8 +1,7 @@
using System.Text.Json;
var runtimeFile = Path.Combine(AppContext.BaseDirectory, "runtime.json");
-if (!File.Exists(runtimeFile))
-{
+if (!File.Exists(runtimeFile)) {
Console.WriteLine("runtime.json missing");
return;
}
@@ -14,4 +13,3 @@ var runtime = doc.RootElement.TryGetProperty("runtime", out var value)
: "unknown";
Console.WriteLine($"runtime={runtime}");
-
diff --git a/tests/projects/csharp/exe_with_library/src/lib/Greeter.cs b/tests/projects/csharp/exe_with_library/src/lib/Greeter.cs
index 546dd4b6f..cf895138a 100644
--- a/tests/projects/csharp/exe_with_library/src/lib/Greeter.cs
+++ b/tests/projects/csharp/exe_with_library/src/lib/Greeter.cs
@@ -1,10 +1,7 @@
namespace MyLib;
-public static class Greeter
-{
- public static string Greet(string name)
- {
+public static class Greeter {
+ public static string Greet(string name) {
return $"hello {name}!";
}
}
-
diff --git a/tests/projects/csharp/multiple_library/src/libalpha/Alpha.cs b/tests/projects/csharp/multiple_library/src/libalpha/Alpha.cs
index f203d9c9e..a10ed6d73 100644
--- a/tests/projects/csharp/multiple_library/src/libalpha/Alpha.cs
+++ b/tests/projects/csharp/multiple_library/src/libalpha/Alpha.cs
@@ -1,10 +1,7 @@
namespace LibAlpha;
-public static class Alpha
-{
- public static string Message()
- {
+public static class Alpha {
+ public static string Message() {
return "alpha";
}
}
-
diff --git a/tests/projects/csharp/multiple_library/src/libbeta/Beta.cs b/tests/projects/csharp/multiple_library/src/libbeta/Beta.cs
index 5e431039f..c96944dc5 100644
--- a/tests/projects/csharp/multiple_library/src/libbeta/Beta.cs
+++ b/tests/projects/csharp/multiple_library/src/libbeta/Beta.cs
@@ -2,11 +2,8 @@ using LibAlpha;
namespace LibBeta;
-public static class Beta
-{
- public static string Message()
- {
+public static class Beta {
+ public static string Message() {
return Alpha.Message() + "+beta";
}
}
-