PO/Library/Artifacts/8b/8bb21addbcddb9f33468a43637a...

100 lines
9.6 KiB
Plaintext
Raw Normal View History

2022-01-12 10:06:03 +03:00
<0F>&x2019.4.19f1<00><><EFBFBD><EFBFBD> <00><>f<EFBFBD><66>!<21>5<>9<EFBFBD>4Q<0E><>B<00>7<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><><00> E<00> <00><00>#<00>.<00>,<00>5a<00> <00><00>#<00>.<00>,<00><00><00>r<00> <00><00># <00>.<00>,
<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD> <01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00> Q<00>j<00><00><00>J<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><00>\<00><00><><EFBFBD><EFBFBD><EFBFBD><00>H<00>r<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>H<00>w<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>H<00><><00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>y<00>
<00> <00><00>#!<00>.<00>,"<00><00><><00><><EFBFBD><EFBFBD>#@1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>$<00><00><00>%.<00>j<00>&<00><00><><00><><EFBFBD><EFBFBD>'<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>(<00><00><00><00>)<00>j<00><><EFBFBD><EFBFBD><EFBFBD>*<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD>+<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>,@<00><00><00>-Q<00>j<00>.y<00>
<00> /<00><00>#0<00>.<00>,1<00> <00><>2@<00><00><> 3@<00><00>#4<00>.<00>,5<00>H<00><><00><><EFBFBD><EFBFBD>6<01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>7@<00><00><00>8Q<00>j<00>9H<00><><00><><EFBFBD><EFBFBD>:<01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>;@<00><00><00><Q<00>j<00>=H<00><><00><><EFBFBD><EFBFBD>><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>?@<00><00><00>@Q<00>j<00>AMonoImporterPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_ExternalObjectsSourceAssetIdentifiertypeassemblynamem_UsedFileIDsm_DefaultReferencesexecutionOrdericonm_UserDatam_AssetBundleNamem_AssetBundleVariants<00><><EFBFBD>G<EFBFBD><47>܏Z56<35>:!@i<>J*<00><00>7<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><><00>E<00> <00><00><00>.<00><00>(a<00> <00><00><00>.<00><00><00><00>r<00> <00><00> <00>.<00>
<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD> <01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00> Q<00>j<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00><00><00>=<00><><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><01><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><01>H<00><><00><><EFBFBD><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>y<00>
<00> <00><00><00>.<00><00>y<00>Q <00><00><00>.<00> <00><00><00>X!H<00>i<00><><EFBFBD><EFBFBD>"<10>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>#@<00><00><00>$Q<00>j<00>%H<00>u<00><><EFBFBD><EFBFBD>&<10>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>'@<00><00><00>(Q<00>j<00>)PPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_DefaultReferencesm_Iconm_ExecutionOrderm_ClassNamem_Namespace\<00>y<EFBFBD>`<00>y<EFBFBD>ContentValidation<00>using NUnit.Framework;
using ContentType = UnityEngine.UI.InputField.ContentType;
namespace Core.InputField
{
public class ContentValidation : TestBehaviourBase<UnityEngine.UI.InputField>
{
[Test]
[TestCase(ContentType.Alphanumeric, "0", "0")]
[TestCase(ContentType.Alphanumeric, "1", "1")]
[TestCase(ContentType.Alphanumeric, "123456", "123456")]
[TestCase(ContentType.Alphanumeric, "0123456", "0123456")]
[TestCase(ContentType.Alphanumeric, "111110123456", "111110123456")]
[TestCase(ContentType.Alphanumeric, "123456", "123456")]
[TestCase(ContentType.Alphanumeric, "-1.0", "10")]
[TestCase(ContentType.Alphanumeric, "-00.45", "0045")]
[TestCase(ContentType.Alphanumeric, "-1111101.23456", "111110123456")]
[TestCase(ContentType.Alphanumeric, "Test", "Test")]
[TestCase(ContentType.Alphanumeric, "-1-", "1")]
[TestCase(ContentType.Alphanumeric, "--1", "1")]
[TestCase(ContentType.Alphanumeric, "123456abc", "123456abc")]
[TestCase(ContentType.Alphanumeric, "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789")]
[TestCase(ContentType.DecimalNumber, "0", "0")]
[TestCase(ContentType.DecimalNumber, "1", "1")]
[TestCase(ContentType.DecimalNumber, "123456", "123456")]
[TestCase(ContentType.DecimalNumber, "0123456", "0123456")]
[TestCase(ContentType.DecimalNumber, "111110123456", "111110123456")]
//[TestCase(ContentType.DecimalNumber, "3.14", "3.14")]
//[TestCase(ContentType.DecimalNumber, "1.23", "1.23")]
//[TestCase(ContentType.DecimalNumber, "1.0", "1.0")]
//[TestCase(ContentType.DecimalNumber, "00.45", "00.45")]
//[TestCase(ContentType.DecimalNumber, "1111101.23456", "1111101.23456")]
//[TestCase(ContentType.DecimalNumber, "-1", "-1")]
[TestCase(ContentType.DecimalNumber, "-123456", "-123456")]
[TestCase(ContentType.DecimalNumber, "-0123456", "-0123456")]
[TestCase(ContentType.DecimalNumber, "-111110123456", "-111110123456")]
//[TestCase(ContentType.DecimalNumber, "-3.14", "-3.14")]
//[TestCase(ContentType.DecimalNumber, "-1.23", "-1.23")]
//[TestCase(ContentType.DecimalNumber, "-1.0", "-1.0")]
//[TestCase(ContentType.DecimalNumber, "-00.45", "-00.45")]
//[TestCase(ContentType.DecimalNumber, "-1111101.23456", "-1111101.23456")]
[TestCase(ContentType.DecimalNumber, "Test", "")]
[TestCase(ContentType.DecimalNumber, "-1-", "-1")]
//[TestCase(ContentType.DecimalNumber, "-0", "0")]
[TestCase(ContentType.DecimalNumber, "--1", "-1")]
[TestCase(ContentType.DecimalNumber, "123456abc", "123456")]
//[TestCase(ContentType.DecimalNumber, "12.34.5#6abc", "12.3456")]
[TestCase(ContentType.EmailAddress, "name@domain.com", "name@domain.com")]
[TestCase(ContentType.EmailAddress, "name@@@domain.com", "name@domain.com")]
[TestCase(ContentType.EmailAddress, "name@domain.co.uk", "name@domain.co.uk")]
[TestCase(ContentType.EmailAddress, "name.other@domain-site.co.uk", "name.other@domain-site.co.uk")]
[TestCase(ContentType.EmailAddress, "name!#$%&'*+-/=?^_`{|}~@domain.com", "name!#$%&'*+-/=?^_`{|}~@domain.com")]
[TestCase(ContentType.IntegerNumber, "0", "0")]
[TestCase(ContentType.IntegerNumber, "1", "1")]
[TestCase(ContentType.IntegerNumber, "123456", "123456")]
[TestCase(ContentType.IntegerNumber, "0123456", "0123456")]
[TestCase(ContentType.IntegerNumber, "111110123456", "111110123456")]
[TestCase(ContentType.IntegerNumber, "-1", "-1")]
[TestCase(ContentType.IntegerNumber, "-123456", "-123456")]
[TestCase(ContentType.IntegerNumber, "-0123456", "-0123456")]
[TestCase(ContentType.IntegerNumber, "-111110123456", "-111110123456")]
[TestCase(ContentType.IntegerNumber, "3.14", "314")]
[TestCase(ContentType.IntegerNumber, "Test", "")]
[TestCase(ContentType.IntegerNumber, "-1-", "-1")]
//[TestCase(ContentType.IntegerNumber, "-0", "0")]
//[TestCase(ContentType.IntegerNumber, "-0", "")]
[TestCase(ContentType.IntegerNumber, "--1", "-1")]
[TestCase(ContentType.IntegerNumber, "123456abc", "123456")]
[TestCase(ContentType.IntegerNumber, "12.34.5#6abc", "123456")]
[TestCase(ContentType.Name, "john smith", "John Smith")]
[TestCase(ContentType.Name, "mary jane", "Mary Jane")]
[TestCase(ContentType.Name, "jOHn smIth", "John Smith")]
[TestCase(ContentType.Name, "john123 smith123", "John Smith")]
[TestCase(ContentType.Name, "Bucky O'Hare", "Bucky O'Hare")]
[TestCase(ContentType.Name, "bucky o'Har'e", "Bucky O'Hare")]
[TestCase(ContentType.Name, "first second third", "First Second Third")]
[TestCase(ContentType.Pin, "012345", "012345")]
[TestCase(ContentType.Pin, "012345abc", "012345")]
[TestCase(ContentType.Pin, "0a1b2c3#45", "012345")]
[TestCase(ContentType.Pin, "-012345", "-012345")]
[TestCase(ContentType.Pin, " 012345", "012345")]
public void ValueIsValidatedCorrectly(ContentType type, string testValue, string expected)
{
m_TestObject.contentType = type;
m_TestObject.text = testValue;
Assert.AreEqual(expected, m_TestObject.text);
}
}
}
ContentValidationCore.InputField