Skip to content

Commit d95149c

Browse files
authored
Merge pull request #29 from in-async/release/v0.7.1
Release/v0.7.1
2 parents 359a189 + 9a55f38 commit d95149c

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

Inasync.PrimitiveAssert.Tests/IssueTests.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections;
33
using System.Collections.Concurrent;
44
using System.Collections.Generic;
5+
using System.Collections.ObjectModel;
56
using System.Linq;
67
using Microsoft.VisualStudio.TestTools.UnitTesting;
78

@@ -177,5 +178,17 @@ public void Issue24_Test() {
177178
new ConcurrentQueue<int>(new[] { 1, 2 }).AssertIs(new[] { 1, 2 });
178179
new ConcurrentStack<int>(new[] { 1, 2 }).AssertIs(new[] { 2, 1 });
179180
}
181+
182+
[TestMethod]
183+
public void Issue27_Test() {
184+
new ReadOnlyCollection<int>(new[] { 1, 2, }).AssertIs(new[] { 1, 2, });
185+
new ReadOnlyDictionary<int, string>(new Dictionary<int, string> {
186+
{ 1, "a" },
187+
{ 2, "b" },
188+
}).AssertIs(new Dictionary<int, string> {
189+
{ 1, "a" },
190+
{ 2, "b" },
191+
});
192+
}
180193
}
181194
}

Inasync.PrimitiveAssert/Inasync.PrimitiveAssert.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PackageProjectUrl>https://github.com/in-async/PrimitiveAssert</PackageProjectUrl>
1010
<PackageLicenseUrl>https://github.com/in-async/PrimitiveAssert/blob/master/LICENSE</PackageLicenseUrl>
1111
<PackageTags>library test unittest assert deep</PackageTags>
12-
<Version>0.7.0</Version>
12+
<Version>0.7.1</Version>
1313
</PropertyGroup>
1414

1515
</Project>

Inasync.PrimitiveAssert/Internals/TypeExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static bool IsPrimitiveData(this Type type) {
4646
/// <see cref="System.Collections.Generic"/>,
4747
/// <see cref="System.Collections.Concurrent"/>,
4848
/// <see cref="System.Linq"/>,
49+
/// <see cref="System.Collections.ObjectModel"/>
4950
/// のいずれかの名前空間に属する <see cref="IEnumerable"/> 実装を指します。
5051
/// </para>
5152
/// </summary>
@@ -59,6 +60,7 @@ public static bool IsSystemCollection(this Type type) {
5960
"System.Collections.Generic" => true,
6061
"System.Collections.Concurrent" => true,
6162
"System.Linq" => true,
63+
"System.Collections.ObjectModel" => true,
6264
_ => false,
6365
};
6466
}

0 commit comments

Comments
 (0)