Skip to content

Commit 96017f1

Browse files
committed
bubblesort-test: some adjustments
1 parent c0bfae3 commit 96017f1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

resources/minitscript/tests/bubblesort-test.tscript

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,31 +37,31 @@ function: main()
3737
console.printLine()
3838
#
3939
$count = 1000
40-
console.print("Creating array of integers with " + $count + " entries")
4140
$startTime = time.getCurrentMillis()
42-
#
4341
$array = []
4442
for ($i = 0, $i < $count, ++$i)
4543
$array[] = $count - $i
4644
end
45+
$endTime = time.getCurrentMillis()
46+
console.printLine()
47+
console.printLine("Creating array of integers: Time: " + ($endTime - $startTime) + ": " + $array)
48+
console.printLine()
4749

4850
$arrayA = $array
4951
$arrayB = $array
5052
# test bubble sort A
5153
$startTime = time.getCurrentMillis()
5254
bubbleSortA($arrayA)
5355
$endTime = time.getCurrentMillis()
54-
console.printLine($arrayA)
5556
console.printLine()
56-
console.printLine("bubbleSortA: Time: " + ($endTime - $startTime) + ": " + $array)
57+
console.printLine("bubbleSortA: Time: " + ($endTime - $startTime) + ": " + $arrayA)
5758
console.printLine()
5859

5960
# test bubble sort B
6061
$startTime = time.getCurrentMillis()
6162
bubbleSortB($arrayB)
6263
$endTime = time.getCurrentMillis()
63-
console.printLine($arrayB)
6464
console.printLine()
65-
console.printLine("bubbleSortB: Time: " + ($endTime - $startTime) + ": " + $array)
65+
console.printLine("bubbleSortB: Time: " + ($endTime - $startTime) + ": " + $arrayB)
6666
console.printLine()
6767
end

0 commit comments

Comments
 (0)