Skip to content

Instantly share code, notes, and snippets.

@henryhamon
Last active March 4, 2022 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henryhamon/cffaf2095a33fde087cccad92e1580ff to your computer and use it in GitHub Desktop.
Save henryhamon/cffaf2095a33fde087cccad92e1580ff to your computer and use it in GitHub Desktop.
codeGolf.LabelCode
Class codeGolf.LabelCode
{
ClassMethod Validate(s As %String) As %Boolean
{
Quit 0
}
}
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