Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 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