-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #939 from oocytanb/fix/m17n_value_caching
Fix incorrect value caching of M17N
- Loading branch information
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using NUnit.Framework; | ||
using UniGLTF.M17N; | ||
using UnityEngine; | ||
|
||
namespace UniGLTF | ||
{ | ||
public class M17NTest | ||
{ | ||
enum M17NTestEnum | ||
{ | ||
Foo, | ||
Bar, | ||
Baz, | ||
} | ||
|
||
[Test] | ||
public void SimpleMsgTest() | ||
{ | ||
Assert.AreEqual("Foo", M17NTestEnum.Foo.Msg()); | ||
Assert.AreEqual("Bar", M17NTestEnum.Bar.Msg()); | ||
Assert.AreEqual("Baz", M17NTestEnum.Baz.Msg()); | ||
|
||
// test caching | ||
Assert.AreEqual("Foo", M17NTestEnum.Foo.Msg()); | ||
Assert.AreEqual("Bar", M17NTestEnum.Bar.Msg()); | ||
Assert.AreEqual("Baz", M17NTestEnum.Baz.Msg()); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.