mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-25 00:35:26 +00:00
make some tests faster (#9413)
* remove duplicated slow test * smaller `convex hull` * smaller sleep * faster `trtree` * smaller sleep in `tfuturestream`
This commit is contained in:
@@ -3,10 +3,9 @@ discard """
|
||||
output: '''
|
||||
done
|
||||
And we get here
|
||||
true
|
||||
true
|
||||
true
|
||||
true
|
||||
1
|
||||
2
|
||||
3
|
||||
'''
|
||||
"""
|
||||
import hashes, sequtils, tables
|
||||
@@ -119,8 +118,7 @@ block thashes:
|
||||
newTable[uint32, string](),
|
||||
newTable[uint64, string](),
|
||||
)
|
||||
|
||||
echo "true"
|
||||
echo "1"
|
||||
|
||||
|
||||
block tindexby:
|
||||
@@ -188,7 +186,7 @@ block ttables2:
|
||||
|
||||
|
||||
run1()
|
||||
echo "true"
|
||||
echo "2"
|
||||
|
||||
|
||||
block tablesref:
|
||||
@@ -355,21 +353,4 @@ block tablesref:
|
||||
assert t.len() == 0
|
||||
|
||||
orderedTableSortTest()
|
||||
echo "true"
|
||||
|
||||
|
||||
block tablesref2:
|
||||
proc TestHashIntInt() =
|
||||
var tab = newTable[int,int]()
|
||||
for i in 1..1_000_000:
|
||||
tab[i] = i
|
||||
for i in 1..1_000_000:
|
||||
var x = tab[i]
|
||||
if x != i : echo "not found ", i
|
||||
|
||||
proc run1() = # occupied Memory stays constant, but
|
||||
for i in 1 .. 50: # aborts at run: 44 on win32 with 3.2GB with out of memory
|
||||
TestHashIntInt()
|
||||
|
||||
run1()
|
||||
echo "true"
|
||||
echo "3"
|
||||
|
||||
Reference in New Issue
Block a user