Skip to content

Commit d843ecf

Browse files
authored
Run runnableExamples in CI (#105)
1 parent 910f7ff commit d843ecf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

bigints.nimble

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ task test, "Test bigints":
1818
echo " using " & gc & " GC"
1919
for file in ["tbigints.nim", "tbugs.nim"]:
2020
exec "nim r --hints:off --experimental:strictFuncs --backend:" & backend & " --gc:" & gc & " tests/" & file
21+
exec "nim doc --hints:off --backend:" & backend & " --gc:" & gc & " src/bigints.nim"
2122

2223
task checkExamples, "Check examples":
2324
echo "checking examples"

src/bigints.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ func invmod*(a, modulus: BigInt): BigInt =
11451145
## Compute the modular inverse of `a` modulo `modulus`.
11461146
## The return value is always in the range `[1, modulus-1]`
11471147
runnableExamples:
1148-
invmod(3.initBigInt, 7.initBigInt) = 5.initBigInt
1148+
assert invmod(3.initBigInt, 7.initBigInt) == 5.initBigInt
11491149

11501150
# extended Euclidean algorithm
11511151
if modulus.isZero:

0 commit comments

Comments
 (0)