summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2018-11-16 13:40:59 -0800
committerOri Bernstein <ori@markovcorp.com>2018-11-16 13:41:17 -0800
commite822c8c079058b4561311f5f0ba81d28c5efa30c (patch)
tree0a01b857e8f18b69cee6ff371dcd51fdf3861a74
parentf86a95697db4370ac5fc12432aa20117d0754139 (diff)
downloadmc-e822c8c079058b4561311f5f0ba81d28c5efa30c.tar.gz
Fix tests.
Missing dep.
-rw-r--r--lib/std/strfind.myr2
-rw-r--r--lib/thread/bld.sub4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/std/strfind.myr b/lib/std/strfind.myr
index 7a94a4f..f6d3167 100644
--- a/lib/std/strfind.myr
+++ b/lib/std/strfind.myr
@@ -31,7 +31,7 @@ const strrfind = {haystack, needle
elif needle.len == 0 && haystack.len == 0
-> `std.Some 0
;;
- for var i = haystack.len - haystack.len; i > 0; i --
+ for var i = haystack.len - needle.len; i >= 0; i--
for var j = 0; j < needle.len; j++
if haystack[i + j] != needle[j]
goto next
diff --git a/lib/thread/bld.sub b/lib/thread/bld.sub
index 598984c..afc7ef1 100644
--- a/lib/thread/bld.sub
+++ b/lib/thread/bld.sub
@@ -91,3 +91,7 @@ lib thrtestutil {noinst} =
lib ../std:std
lib thread
;;
+
+testdeps =
+ ../testr:testr
+;;