Last active
March 4, 2022 19:36
-
-
Save henryhamon/cffaf2095a33fde087cccad92e1580ff to your computer and use it in GitHub Desktop.
codeGolf.LabelCode
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
Class codeGolf.LabelCode | |
{ | |
ClassMethod Validate(s As %String) As %Boolean | |
{ | |
Quit 0 | |
} | |
} |
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
Class codeGolf.test.LabelCode Extends %UnitTest.TestCase | |
{ | |
Method TestBasic() | |
{ | |
Do $$$AssertTrue(##class(codeGolf.LabelCode).Validate("143243S4234A")) | |
Do $$$AssertTrue(##class(codeGolf.LabelCode).Validate("2242C")) | |
Do $$$AssertTrue(##class(codeGolf.LabelCode).Validate("39873F783B")) | |
Do $$$AssertTrue(##class(codeGolf.LabelCode).Validate("2243TYG73457353888834534534582R")) | |
Do $$$AssertTrue(##class(codeGolf.LabelCode).Validate("16545HH24S")) | |
Do $$$AssertNotTrue(##class(codeGolf.LabelCode).Validate("442422S")) | |
Do $$$AssertNotTrue(##class(codeGolf.LabelCode).Validate("12423432F")) | |
Do $$$AssertNotTrue(##class(codeGolf.LabelCode).Validate("02423432S")) | |
Do $$$AssertNotTrue(##class(codeGolf.LabelCode).Validate("A2423432S")) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment