File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ fun pad (n : int )
2+ pad-left(show(n), 2 , '0' )
3+
4+ fun main ()
5+ for(0 ,10 ) fn (i)
6+ var t := (43200 * i + 21600 ) / 11
7+ var h := t / 3600
8+ var m := t / 60 % 60
9+ var s := t % 60
10+ println(pad(if is-zero(h) then 12 else h) ++ ": " ++ pad(m) ++ ": " ++ pad(s))
Original file line number Diff line number Diff line change 1+ fun main ()
2+ println("Hello, World! " )
Original file line number Diff line number Diff line change 1+ function Assert-MatchTests {
2+ param (
3+ [Parameter (Mandatory = $true , ValueFromPipeline )] $TestResult
4+ )
5+
6+ if ($TestResult ) {
7+ Write-Error " Output does not match expected results."
8+ }
9+ }
10+
11+ $Error.clear ()
12+ koka - v0 - e " $PSScriptRoot \clockhands.kk" |
13+ Compare-Object (Get-Content " $PSScriptRoot \..\test\clockhands_expected" ) |
14+ Assert-MatchTests &&
15+ koka - v0 - e " $PSScriptRoot \hello.kk" &&
16+ ForEach-Object ' foo'
17+
18+ if ($Error -or ! $? ) {
19+ " *** KOKA TESTS FAILED ***"
20+ }
21+ else {
22+ " KOKA TESTS PASSED"
23+ }
You can’t perform that action at this time.
0 commit comments