Tasproj versioning - use constant in unit test so it doesn't fail on next version bump, when converting bk2, slap the current tasproj verison on it, converting to bk2, remove tasproj version

This commit is contained in:
adelikat 2020-08-06 13:15:25 -05:00
parent af5acb457d
commit f2dba97197
2 changed files with 7 additions and 1 deletions

View File

@ -30,6 +30,9 @@ namespace BizHawk.Client.Common
tas.HeaderEntries[kvp.Key] = kvp.Value;
}
// TODO: we have this version number string generated in multiple places
tas.HeaderEntries[HeaderKeys.MovieVersion] = $"BizHawk v2.0 Tasproj v{TasMovie.CurrentVersion}";
tas.SyncSettingsJson = old.SyncSettingsJson;
tas.Comments.Clear();
@ -63,6 +66,9 @@ namespace BizHawk.Client.Common
bk2.HeaderEntries[kvp.Key] = kvp.Value;
}
// TODO: we have this version number string generated in multiple places
bk2.HeaderEntries[HeaderKeys.MovieVersion] = "BizHawk v2.0";
bk2.SyncSettingsJson = old.SyncSettingsJson;
bk2.Comments.Clear();

View File

@ -13,7 +13,7 @@ namespace BizHawk.Common.Tests.Client.Common.Movie
[DataRow("NonsenseString", 1.0)]
[DataRow("BizHawk v2.0", 1.0)]
[DataRow("BizHawk v2.0 Tasproj v1.0", 1.0)]
[DataRow("BizHawk v2.0 Tasproj v1.1", 1.1)]
[DataRow("BizHawk v2.0 Tasproj v1.1", TasMovie.CurrentVersion)]
public void ParseTasMovieVersion(string movieVersion, double expected)
{
var actual = MovieService.ParseTasMovieVersion(movieVersion);