Skip to content

Commit

Permalink
more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
McJones committed Feb 8, 2024
1 parent 3d6d5ed commit a7f18e2
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Tests/Editor/UnityLocalisationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ private static void CreateAndConfigureProject(string[] lines, string yarnName, s
// flagging it as needing save and reimport
EditorUtility.SetDirty(importer);
importer.SaveAndReimport();

// now open and read out the contents of the json
var json = File.ReadAllText($"{AssetPath}/{projectName}.yarnproject");
Debug.LogWarning(json);
}

public void Cleanup()
Expand Down Expand Up @@ -156,6 +152,12 @@ public void UnityLocalisation_ImplicitStringsImportedCorrectly()
{
var table = ValidateSetup();

// temp logging
var json = File.ReadAllText($"{AssetPath}/ProjectA.yarnproject");
Debug.LogWarning(json);
json = File.ReadAllText($"{AssetPath}/ProjectB.yarnproject");
Debug.LogWarning(json);

// and it needs to have the same number of lines as our projects have
Assert.AreEqual(table.Count(), lines.Count());

Expand All @@ -175,6 +177,12 @@ public void UnityLocalisation_FormerImplictLinesAreRemovedFromStringTables()
// now we tag the yarn
YarnProjectUtility.AddLineTagsToFilesInYarnProject(projectA);

// temp logging
var json = File.ReadAllText($"{AssetPath}/ProjectA.yarnproject");
Debug.LogWarning(json);
json = File.ReadAllText($"{AssetPath}/ProjectB.yarnproject");
Debug.LogWarning(json);

// and now we make sure it correctly added and removed the lines

// the number of lines shouldn't have changed
Expand Down

0 comments on commit a7f18e2

Please sign in to comment.