Created
June 17, 2022 23:30
-
-
Save henryhamon/8b370a94eee23c5b6323f374b2c17832 to your computer and use it in GitHub Desktop.
codeGolf.Leet
This file contains hidden or 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.Leet | |
{ | |
ClassMethod Convert(a As %String) As %String | |
{ | |
; your code here | |
Q "" | |
} | |
} |
This file contains hidden or 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.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