Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/Test-a-function/F-Sharp/test-a-function.fs
Normal file
16
Task/Test-a-function/F-Sharp/test-a-function.fs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
let palindrome (s : string) =
|
||||
let a = s.ToUpper().ToCharArray()
|
||||
Array.rev a = a
|
||||
|
||||
|
||||
open NUnit.Framework
|
||||
|
||||
[<TestFixture>]
|
||||
type TestCases() =
|
||||
[<Test>]
|
||||
member x.Test01() =
|
||||
Assert.IsTrue(palindrome "radar")
|
||||
|
||||
[<Test>]
|
||||
member x.Test02() =
|
||||
Assert.IsFalse(palindrome "hello")
|
||||
Loading…
Add table
Add a link
Reference in a new issue