Skip to content

Commit fdcf018

Browse files
committed
Fix SubPathConstraint example
1 parent 10ad9a4 commit fdcf018

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Assets/APIExamples/Tests/Runtime/NUnit/ConstraintExample.cs

+3-6
Original file line numberDiff line numberDiff line change
@@ -586,13 +586,10 @@ public void SamePathOrUnderConstraint_パス文字列が期待値と同じかそ
586586
}
587587

588588
[Test]
589-
[Explicit("SubPathConstraintとは振る舞いが異なるようなので保留")]
590-
public void SubPathOf_SubPathConstraintとは振る舞いが異なる模様()
589+
public void SubPathConstraint_パス文字列が期待値のサブパスであること()
591590
{
592-
Assert.That("/folder1/./junk/../folder2", Is.SubPathOf("/folder1/folder2"));
593-
Assert.That("/folder1/junk/folder2", Is.Not.SubPathOf("/folder1/folder2"));
594-
Assert.That(@"C:\folder1\folder2\folder3", Is.SubPathOf(@"C:\Folder1\Folder2/Folder3").IgnoreCase);
595-
Assert.That("/folder1/folder2/folder3", Is.Not.SubPathOf("/Folder1/Folder2/Folder3").RespectCase);
591+
Assert.That("/folder1/folder2/folder3", Is.SubPathOf("/folder1/folder2"));
592+
// Note: 最新のNUnitでは`Is.SubPath()`で、実装も異なっている。NUnitのドキュメントにある例がNUnit 3.5では通らない
596593
}
597594
}
598595

UnityTestExamples.sln.DotSettings

+1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010
<s:Boolean x:Key="/Default/UserDictionary/Words/=nowsprinting/@EntryIndexedValue">True</s:Boolean>
1111
<s:Boolean x:Key="/Default/UserDictionary/Words/=Paratus/@EntryIndexedValue">True</s:Boolean>
1212
<s:Boolean x:Key="/Default/UserDictionary/Words/=Semper/@EntryIndexedValue">True</s:Boolean>
13+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Subpath/@EntryIndexedValue">True</s:Boolean>
1314
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ulps/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

0 commit comments

Comments
 (0)