Skip to content

Commit 7b7668f

Browse files
committed
Add snapshot testing
1 parent 0c41ca8 commit 7b7668f

18 files changed

+223
-46
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,3 +348,6 @@ MigrationBackup/
348348

349349
# Ionide (cross platform F# VS Code tools) working folder
350350
.ionide/
351+
352+
# Verify snapshot test received files (not part of source control)
353+
*.received.txt

RegExtract.Test/RegExtract.Test.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp8.0;netcoreapp3.1;net452</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp8.0;netcoreapp3.1;net462;net10.0</TargetFrameworks>
55
<Nullable>enable</Nullable>
66
<IsPackable>false</IsPackable>
77
<LangVersion>latest</LangVersion>
88
</PropertyGroup>
99

1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
12-
<PackageReference Include="xunit" Version="2.6.3" />
13-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
12+
<PackageReference Include="Verify.Xunit" Version="22.10.2" />
13+
<PackageReference Include="xunit" Version="2.6.4" />
14+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
1415
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1516
<PrivateAssets>all</PrivateAssets>
1617
</PackageReference>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CollectionInitializer<List<(char,char)>>[1] (
2+
ConstructTuple<(char,char)>[1] (
3+
StaticParseMethod<char>[2] (),
4+
StaticParseMethod<char>[3] ()
5+
)
6+
)
7+
8+
↓------------↓₀
9+
(↓---↓↓---↓)+₁
10+
(\w)₂(\w)₃
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CollectionInitializer<List<int>>[1] (
2+
StaticParseMethod<int>[2] ()
3+
)
4+
5+
↓----------↓₀
6+
(↓----↓ ?)+₁
7+
(\d+)₂
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Constructor<game>[0] (
2+
StaticParseMethod<int>[1] (),
3+
CollectionInitializer<List<draw>>[2] (
4+
Constructor<draw>[2] (
5+
CollectionInitializer<List<(int,string)>>[3] (
6+
ConstructTuple<(int,string)>[3] (
7+
StaticParseMethod<int>[4] (),
8+
StringCast<string>[5] ()
9+
)
10+
)
11+
)
12+
)
13+
)
14+
15+
Game ↓----↓: ↓---------------------------↓₀
16+
(\d+)₁ (↓-------------------↓;? ?)+₂
17+
(↓----↓ ↓----↓,? ?)+₃
18+
(\d+)₄ (\w+)₅
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CollectionInitializer<List<(char,int)>>[1] (
2+
ConstructTuple<(char,int)>[1] (
3+
StaticParseMethod<char>[2] (),
4+
StaticParseMethod<int>[3] ()
5+
)
6+
)
7+
8+
↓-------------------↓₀
9+
(↓-----↓↓----↓,? ?)+₁
10+
([RL])₂(\d+)₃
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CollectionInitializer<Dictionary<string,(string,string)>>[1] (
2+
StringCast<string>[2] (),
3+
ConstructTuple<(string,string)>[3] (
4+
StringCast<string>[4] (),
5+
StringCast<string>[5] ()
6+
)
7+
)
8+
9+
↓------------------------------------↓₀
10+
(↓----↓ = \(↓---------------↓\);? ?)+₁
11+
(...)₂ (↓----↓, ↓----↓)₃
12+
(...)₄ (...)₅
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CollectionInitializer<List<int>>[1] (
2+
StaticParseMethod<int>[2] ()
3+
)
4+
5+
↓----------↓₀
6+
(↓----↓ ?)+₁
7+
(\d+)₂
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CollectionInitializer<List<int>>[1] (
2+
StaticParseMethod<int>[1] ()
3+
)
4+
5+
(?:↓----↓ ?)+₀
6+
(\d+)₁
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CollectionInitializer<List<int>>[1] (
2+
StaticParseMethod<int>[1] ()
3+
)
4+
5+
↓-------↓₀
6+
(\d+ ?)+₁

0 commit comments

Comments
 (0)