Skip to content

Instantly share code, notes, and snippets.

@eduard93
Forked from henryhamon/CodeGolf.Leet.cls
Created July 2, 2022 10:48
Show Gist options
  • Save eduard93/c5b65135322df07250214830db298dad to your computer and use it in GitHub Desktop.
Save eduard93/c5b65135322df07250214830db298dad to your computer and use it in GitHub Desktop.
codeGolf.Leet
Class CodeGolf.Leet
{
ClassMethod Convert(a As %String) As %String
{
; your code here
Q ""
}
}
Class CodeGolf.Test.Leet Extends %UnitTest.TestCase
{
Method TestBasic()
{
Do $$$AssertEquals(##class(CodeGolf.Leet).Convert("leet"), "13€7")
Do $$$AssertEquals(##class(CodeGolf.Leet).Convert("aaaa"), "4@4@")
Do $$$AssertEquals(##class(CodeGolf.Leet).Convert("Hello WORLD"), "H31£0 W*R1D")
Do $$$AssertEquals(##class(CodeGolf.Leet).Convert("no no no no"), "n0 n* n0 n*")
Do $$$AssertEquals(##class(CodeGolf.Leet).Convert("Iris"), "|r]5")
Do $$$AssertEquals(##class(CodeGolf.Leet).Convert("Zoo"), "20*")
Do $$$AssertEquals(##class(CodeGolf.Leet).Convert("Code golF"), "(0d3 9*1F")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment