Skip to content

Commit

Permalink
fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
krux02 committed Jan 28, 2020
1 parent 6bfda4e commit 55adb5f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions tests/generics/tforwardgeneric.nim
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
discard """
output: "1.1 11\n42\n0"
output: "1.125 11\n42\n0"
ccodecheck: "!@'ClEnv'"
"""

proc p[T](a, b: T): T

echo p(0.9, 0.1), " ", p(9, 1)
echo p(0.875, 0.125), " ", p(9, 1)

proc p[T](a, b: T): T =
let c = b
Expand All @@ -25,4 +25,3 @@ proc print[T](t: T) =
echo t

echo bar()

12 changes: 6 additions & 6 deletions tests/generics/tgenerics_issues.nim
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ discard """
perm: 22 det: 22
TMatrix[3, 3, system.int]
3
@[0.9, 0.1]
@[0.875, 0.125]
U[3]
U[(f: 3)]
U[[3]]
Expand All @@ -20,9 +20,9 @@ concrete 88
2
3
!!Hi!!
G:0,1:0.1
G:0,1:0.1
H:1:0.1
G:0,1:0.125
G:0,1:0.125
H:1:0.125
'''
joinable: false
"""
Expand Down Expand Up @@ -370,7 +370,7 @@ block t2304:
type TV2[T:SomeNumber] = array[0..1, T]
proc newV2T[T](x, y: T=0): TV2[T] = [x, y]

let x = newV2T[float](0.9, 0.1)
let x = newV2T[float](0.875, 0.125)
echo(@x)


Expand Down Expand Up @@ -711,7 +711,7 @@ block t4863:
proc q[j: static[int]](x:H[j]) = echo "H:", j, ":", x.v

var
g0 = G[0,1](v: 0.1)
g0 = G[0,1](v: 0.125)
h0:H[1] = g0
p(g0)
p(h0)
Expand Down

0 comments on commit 55adb5f

Please sign in to comment.