Skip to content

Commit f82f603

Browse files
committed
fix hcr test
1 parent 62703a2 commit f82f603

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

tests/dll/nimhcr_0.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

22
let g_0 = 1000 # new value! but also a "new" global :)
33

4-
proc getInt*(): int = return g_0
4+
proc tgetInt*(): int = return g_0

tests/dll/nimhcr_0_1.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import hotcodereloading
33

44
let g_0 = 42 # lets start with the ultimate answer
55

6-
proc getInt*(): int = return g_0
6+
proc tgetInt*(): int = return g_0
77

88
programResult = 0 # should be accessible
99

tests/dll/nimhcr_0_2.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ echo " 0: I SHOULDN'T BE PRINTED!"
99

1010
var g_0 = 0 # changed value but won't take effect
1111

12-
proc getInt*(): int = return g_0 + g_1 + f_1()
12+
proc tgetInt*(): int = return g_0 + g_1 + f_1()
1313

1414
beforeCodeReload:
1515
echo " 0: before - improved!" # changed handlers!

tests/dll/nimhcr_0_3.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ afterCodeReload:
1616
echo " 0: after - closure iterator: ", c()
1717
echo " 0: after - c_2 = ", c_2
1818

19-
proc getInt*(): int = return g_1 + g_2.len
19+
proc tgetInt*(): int = return g_1 + g_2.len

tests/dll/nimhcr_0_4.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import nimhcr_1 # only importing 1
55

66
let g_0 = 1000 # new value! but also a "new" global :)
77

8-
proc getInt*(): int = return g_0
8+
proc tgetInt*(): int = return g_0
99

1010
proc makeCounter*(): auto =
1111
return iterator: int {.closure.} =

tests/dll/nimhcr_0_5.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
proc getInt*(): int = return 42 # back to the answer...
2+
proc tgetInt*(): int = return 42 # back to the answer...

tests/dll/nimhcr_0_6.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

22
let g_0 = 1000 # new value! but also a "new" global :)
33

4-
proc getInt*(): int = return g_0
4+
proc tgetInt*(): int = return g_0

tests/dll/nimhcr_integration.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ After instrumenting code, the stacktrace actually points to the call to `check m
7979
## A few files can be updated by calling `update` for each of their indexes
8080
## and after that with a single call to `compileReloadExecute` the new version
8181
## of the program will be compiled, reloaded, and the only thing the main module
82-
## calls from `nimhcr_0.nim` (the procedure `getInt` proc) is called for a result.
82+
## calls from `nimhcr_0.nim` (the procedure `tgetInt` proc) is called for a result.
8383
##
8484
## This test is expected to be executed with arguments - the full nim compiler
8585
## command used for building it - so it can rebuild iself the same way - example:
@@ -91,7 +91,7 @@ After instrumenting code, the stacktrace actually points to the call to `check m
9191

9292
import os, osproc, strutils, hotcodereloading
9393

94-
import nimhcr_0 # getInt() - the only thing we continually call from the main module
94+
import nimhcr_0 # tgetInt() - the only thing we continually call from the main module
9595

9696
proc compileReloadExecute() =
9797
# Remove the `--forceBuild` option - is there in the first place because:
@@ -121,7 +121,7 @@ proc compileReloadExecute() =
121121
quit 1
122122
echo "main: hasAnyModuleChanged? ", hasAnyModuleChanged()
123123
performCodeReload()
124-
echo " The answer is: ", getInt()
124+
echo " The answer is: ", tgetInt()
125125

126126
# there are 3 files and all of them start from their 1st version
127127
var vers = [1, 1, 1]

0 commit comments

Comments
 (0)