mirror of
https://github.com/dcronqvist/DotTiled.git
synced 2025-02-05 08:52:50 +02:00
Fix so tests still work
This commit is contained in:
parent
85038d0dc3
commit
da3c4351c3
2 changed files with 7 additions and 7 deletions
6
.github/workflows/tests.yml
vendored
6
.github/workflows/tests.yml
vendored
|
@ -14,9 +14,9 @@ jobs:
|
|||
with:
|
||||
dotnet-version: 8.0.x
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
run: dotnet restore src/DotTiled.sln
|
||||
- name: Build
|
||||
run: dotnet build --no-restore
|
||||
run: dotnet build --no-restore src/DotTiled.sln
|
||||
- name: Test
|
||||
run: dotnet test --no-build --verbosity normal
|
||||
run: dotnet test --no-build --verbosity normal src/DotTiled.sln
|
||||
|
|
@ -39,19 +39,19 @@ namespace MyBenchmarks
|
|||
|
||||
[BenchmarkCategory("MapFromInMemoryTmxString")]
|
||||
[Benchmark(Baseline = true, Description = "DotTiled")]
|
||||
public DotTiled.Map LoadWithDotTiledFromInMemoryTmxString()
|
||||
public DotTiled.Model.Map LoadWithDotTiledFromInMemoryTmxString()
|
||||
{
|
||||
using var stringReader = new StringReader(_tmxContents);
|
||||
using var xmlReader = XmlReader.Create(stringReader);
|
||||
using var mapReader = new DotTiled.TmxMapReader(xmlReader, _ => throw new Exception(), _ => throw new Exception(), []);
|
||||
using var mapReader = new DotTiled.Serialization.Tmx.TmxMapReader(xmlReader, _ => throw new Exception(), _ => throw new Exception(), []);
|
||||
return mapReader.ReadMap();
|
||||
}
|
||||
|
||||
[BenchmarkCategory("MapFromInMemoryTmjString")]
|
||||
[Benchmark(Baseline = true, Description = "DotTiled")]
|
||||
public DotTiled.Map LoadWithDotTiledFromInMemoryTmjString()
|
||||
public DotTiled.Model.Map LoadWithDotTiledFromInMemoryTmjString()
|
||||
{
|
||||
using var mapReader = new DotTiled.TmjMapReader(_tmjContents, _ => throw new Exception(), _ => throw new Exception(), []);
|
||||
using var mapReader = new DotTiled.Serialization.Tmj.TmjMapReader(_tmjContents, _ => throw new Exception(), _ => throw new Exception(), []);
|
||||
return mapReader.ReadMap();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue