Wes xx build fix

This commit is contained in:
Dries Van Schuylenbergh
2023-03-09 12:44:11 +00:00
committed by Louis Adriaens
parent 601cf38c61
commit 2fa54620ef
74 changed files with 1009 additions and 214 deletions

View File

@@ -0,0 +1,27 @@
using UnityEngine;
public class TestUserCreationScreen : MonoBehaviour
{
void Start()
{
TestIsValidUsernameTrue();
TestIsValidUsernameFalse();
}
public void TestIsValidUsernameTrue()
{
foreach (char c in "abcdefghijklmnopqrstuvwxyz")
Debug.Assert(UserCreationScreen.IsValidUsername(c.ToString()));
Debug.Assert(UserCreationScreen.IsValidUsername("abcdefghijkl"));
}
public void TestIsValidUsernameFalse()
{
Debug.Assert(!UserCreationScreen.IsValidUsername(string.Empty));
foreach (char c in " \n\t0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ+-*/%_(){}[]\\")
Debug.Assert(!UserCreationScreen.IsValidUsername(c.ToString()));
Debug.Assert(!UserCreationScreen.IsValidUsername("abcdefghijklmnopqrstuvwxyz"));
}
}