-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9bbab6c
commit 57d6611
Showing
27 changed files
with
342 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=46bc3af4_002Dd0ae_002D42bf_002Db5af_002D5a24a008628b/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" IsActive="True" Name="IsPrime_InputIs1_ReturnFalse" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
 | ||
<Project Location="F:\File\src\ParaPartyUtil\Tests" Presentation="&lt;Tests&gt;" />
 | ||
<TestAncestor>
 | ||
<TestId>MSTest::16D26EE2-4A65-4189-AD77-38E73A038454::net8.0::Paraparty.Tests.Kotlinize.CollectionExtension</TestId>
 | ||
<TestId>MSTest::16D26EE2-4A65-4189-AD77-38E73A038454::net8.0::Paraparty.Tests.Kotlinize.TestScopedFunction</TestId>
 | ||
<TestId>MSTest::16D26EE2-4A65-4189-AD77-38E73A038454::net8.0::Paraparty.Tests.UnityNative.TestStringExtension</TestId>
 | ||
</TestAncestor>
 | ||
</SessionState></s:String></wpf:ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Paraparty.Kotlinize; | ||
|
||
namespace Paraparty.Tests.Kotlinize; | ||
|
||
[TestClass] | ||
public class CollectionExtension | ||
{ | ||
[TestMethod] | ||
public void CreateList() | ||
{ | ||
var t = Collections.ListOf(1, 2.2); | ||
Assert.AreEqual(1, t[0]); | ||
Assert.AreEqual(2.2, t[1]); | ||
} | ||
|
||
[TestMethod] | ||
public void CreatePair() | ||
{ | ||
var t = "ΩΩPARTS".To("かめりあ"); | ||
Assert.AreEqual("ΩΩPARTS", t.Key); | ||
Assert.AreEqual("かめりあ", t.Value); | ||
} | ||
|
||
[TestMethod] | ||
public void CreateMap() | ||
{ | ||
var t = Collections.MapOf( | ||
"ΩΩPARTS".To("かめりあ"), | ||
"ANiMA".To("Xi") | ||
); | ||
Assert.AreEqual("かめりあ", t["ΩΩPARTS"]); | ||
Assert.AreEqual("Xi", t["ANiMA"]); | ||
} | ||
|
||
[TestMethod] | ||
public void CreateSet() | ||
{ | ||
var t = Collections.SetOf( | ||
1, 1, 4, 5, 1, 4 | ||
); | ||
Assert.AreEqual(3,t.Count); | ||
Assert.IsTrue(t.Contains(1)); | ||
Assert.IsFalse(t.Contains(2)); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,31 @@ | ||
using NUnit.Framework; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Paraparty.Kotlinize; | ||
|
||
namespace Paraparty.Tests.Kotlinize; | ||
|
||
public class CollectionExtension | ||
[TestClass] | ||
public class TestScopedFunction | ||
{ | ||
[Test] | ||
public void CreateList() | ||
[TestMethod] | ||
public void TestAlso() | ||
{ | ||
var t = Collections.ListOf(1, 2.2); | ||
Assert.AreEqual(1, t[0]); | ||
Assert.AreEqual(2.2, t[1]); | ||
var numbers = new List<string> { "one", "two", "three" }; | ||
numbers | ||
.Also(it => Console.WriteLine($"The list elements before adding new one: {string.Join(',', it)}")) | ||
.Add("four"); | ||
// pass | ||
} | ||
|
||
[Test] | ||
public void CreatePair() | ||
[TestMethod] | ||
public void TestLet() | ||
{ | ||
var t = "ΩΩPARTS".To("かめりあ"); | ||
Assert.AreEqual("ΩΩPARTS", t.Key); | ||
Assert.AreEqual("かめりあ", t.Value); | ||
} | ||
|
||
[Test] | ||
public void CreateMap() | ||
{ | ||
var t = Collections.MapOf( | ||
"ΩΩPARTS".To("かめりあ"), | ||
"ANiMA".To("Xi") | ||
); | ||
Assert.AreEqual("かめりあ", t["ΩΩPARTS"]); | ||
Assert.AreEqual("Xi", t["ANiMA"]); | ||
} | ||
|
||
[Test] | ||
public void CreateSet() | ||
{ | ||
var t = Collections.SetOf( | ||
1, 1, 4, 5, 1, 4 | ||
); | ||
Assert.AreEqual(3,t.Count); | ||
Assert.True(t.Contains(1)); | ||
Assert.False(t.Contains(2)); | ||
var numbers = new[] { "one", "two", "three", "four", "five" }; | ||
numbers.Select(s => s.Length) | ||
.Where(l => l > 3) | ||
.Let(it => Console.WriteLine(string.Join(",", it))); | ||
// pass | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,20 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
|
||
<TargetFramework>net8.0</TargetFramework> | ||
<IsPackable>false</IsPackable> | ||
|
||
<RootNamespace>Paraparty.Tests</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" /> | ||
<PackageReference Include="NUnit" Version="3.13.2" /> | ||
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" /> | ||
<PackageReference Include="coverlet.collector" Version="3.1.0" /> | ||
<PackageReference Include="MSTest" Version="3.4.3"/> | ||
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="17.10.4"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\JsonChan\JsonChan.csproj" /> | ||
<ProjectReference Include="..\Kotlinize\Kotlinize.csproj" /> | ||
<ProjectReference Include="..\JsonChan\JsonChan.csproj"/> | ||
<ProjectReference Include="..\UnityNative\UnityNative.csproj"/> | ||
<ProjectReference Include="..\Kotlinize\Kotlinize.csproj"/> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.