summaryrefslogtreecommitdiff
path: root/caching-tests
diff options
context:
space:
mode:
authorGravatar Ziv Scully <ziv@mit.edu>2015-11-09 13:37:31 -0500
committerGravatar Ziv Scully <ziv@mit.edu>2015-11-09 13:37:31 -0500
commitaa2c8c64542d7930773da26573e186ec3753c268 (patch)
treea5b38a3ba9faa66bec88afc89df8c93b51508318 /caching-tests
parent1c2069212a7dec30db45e02391d7ca0154cd5709 (diff)
Progress on free paths, but consolidation seems to fail more with them.
Diffstat (limited to 'caching-tests')
-rw-r--r--caching-tests/test.ur18
-rw-r--r--caching-tests/test.urp1
-rw-r--r--caching-tests/test.urs1
3 files changed, 19 insertions, 1 deletions
diff --git a/caching-tests/test.ur b/caching-tests/test.ur
index e08c6e47..0549840d 100644
--- a/caching-tests/test.ur
+++ b/caching-tests/test.ur
@@ -5,7 +5,23 @@ fun cache id =
FROM tab
WHERE tab.Id = {[id]});
return <xml><body>
- Reading {[id]}.
+ (* Reading {[id]}. *)
+ {case res of
+ None => <xml>?</xml>
+ | Some row => <xml>{[row.Tab.Val]}</xml>}
+ </body></xml>
+
+(* fun sillyRecursive {Id = id, FooBar = fooBar} = *)
+(* if fooBar <= 0 *)
+(* then 0 *)
+(* else 1 + sillyRecursive {Id = id, FooBar = fooBar - 1} *)
+
+fun cacheR (r : {Id : int, FooBar : int}) =
+ res <- oneOrNoRows (SELECT tab.Val
+ FROM tab
+ WHERE tab.Id = {[r.Id]});
+ return <xml><body>
+ (* Reading {[r.Id]}. *)
{case res of
None => <xml>?</xml>
| Some row => <xml>{[row.Tab.Val]}</xml>}
diff --git a/caching-tests/test.urp b/caching-tests/test.urp
index 62041bdd..cea8821e 100644
--- a/caching-tests/test.urp
+++ b/caching-tests/test.urp
@@ -4,5 +4,6 @@ safeGet Test/flush
safeGet Test/flash
safeGet Test/floosh
# safeGet Test/flush17
+minHeap 4096
test
diff --git a/caching-tests/test.urs b/caching-tests/test.urs
index ebe6bf56..1fa5a9c2 100644
--- a/caching-tests/test.urs
+++ b/caching-tests/test.urs
@@ -1,4 +1,5 @@
val cache : int -> transaction page
+val cacheR : {Id : int, FooBar : int} -> transaction page
(* val cache2 : int -> int -> transaction page *)
val flush : int -> transaction page
val flash : int -> transaction page