Update of /cvsroot/monetdb/MonetDB5/src/mal/Tests
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9755/mal/Tests

Modified Files:
        tst1000.mal tst1000.stable.out tst2560.mal tst2560.stable.out 
        tst610.mal tst610.stable.out 
Log Message:
Use a stricter runtime test to trap possible BAT bind mismatchs.


Index: tst1000.mal
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/Tests/tst1000.mal,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- tst1000.mal 12 May 2007 07:35:31 -0000      1.6
+++ tst1000.mal 12 Oct 2007 17:40:05 -0000      1.7
@@ -3,5 +3,5 @@
 b:= bat.new(:int,:int);
 bat.insert(b,1,2);
 bat.setName(b,"mybat");
-c:= bbp.bind("mybat");
+c:bat[:int,:int]:= bbp.bind("mybat");
 io.print(c);

Index: tst610.stable.out
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/Tests/tst610.stable.out,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- tst610.stable.out   14 May 2007 17:00:22 -0000      1.39
+++ tst610.stable.out   12 Oct 2007 17:40:06 -0000      1.40
@@ -83,24 +83,24 @@
     io.print("open box");      # 12 IOprint_val (_14:void)<-(_15:str)
     bbp.open();        # 13 CMDbbpopen (_16:void)
 #user.refs();  # 14  (_17:str)
-    t:bat[:any,:any]  := bbp.bind("tasks");    # 15 CMDbbpbind 
(t:bat[:any,:any])<-(_10:str)
-    io.print(t);       # 16 IOprint_val (_19:void)<-(t:bat[:any,:any])
-    bbp.release(t);    # 17 CMDbbpreleaseBAT (_20:void)<-(t:bat[:any,:any])
+    t:bat[:int,:int]  := bbp.bind("tasks");    # 15 CMDbbpbind 
(t:bat[:int,:int])<-(_10:str)
+    io.print(t);       # 16 IOprint_val (_19:void)<-(t:bat[:int,:int])
+    bbp.release(t);    # 17 CMDbbpreleaseBAT (_20:void)<-(t:bat[:int,:int])
 #user.refs();  # 18  (_17:str)
-    io.print(t);       # 19 IOprint_val (_21:void)<-(t:bat[:any,:any])
+    io.print(t);       # 19 IOprint_val (_21:void)<-(t:bat[:int,:int])
 catch MALException:str ;       # 20  (MALException:str) jump 22
     io.print("BAT was released");      # 21 IOprint_val (_23:void)<-(_24:str)
 exit MALException:str ;        # 22  (MALException:str)
-# the bat is still visible, because the destroy only   # 23  (_26:str)
-# marks it for deletion at the end of session or       # 24  (_27:str)
-# when the reference counters drop to zero     # 25  (_28:str)
-    t:bat[:any,:any]  := bbp.bind("tasks");    # 26 CMDbbpbind 
(t:bat[:any,:any])<-(_10:str)
+# the bat is still visible, because the destroy only   # 23  (_25:str)
+# marks it for deletion at the end of session or       # 24  (_26:str)
+# when the reference counters drop to zero     # 25  (_27:str)
+    t:bat[:int,:int]  := bbp.bind("tasks");    # 26 CMDbbpbind 
(t:bat[:int,:int])<-(_10:str)
 #user.refs();  # 27  (_17:str)
 # to really remove, we get rid of the current  # 28  (_28:str)
 # references as well   # 29  (_29:str)
-    bbp.destroy(t,true);       # 30 CMDbbpdestroyBAT 
(_30:void)<-(t:bat[:any,:any])(_12:bit)
+    bbp.destroy(t,true);       # 30 CMDbbpdestroyBAT 
(_30:void)<-(t:bat[:int,:int])(_12:bit)
 #user.refs();  # 31  (_17:str)
-    io.print(t);       # 32 IOprint_val (_31:void)<-(t:bat[:any,:any])
+    io.print(t);       # 32 IOprint_val (_31:void)<-(t:bat[:int,:int])
 catch MALException:str ;       # 33  (MALException:str) jump 35
     io.print("BAT was destroyed");     # 34 IOprint_val (_32:void)<-(_33:str)
 exit MALException:str ;        # 35  (MALException:str)

Index: tst1000.stable.out
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/Tests/tst1000.stable.out,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- tst1000.stable.out  12 May 2007 07:35:32 -0000      1.27
+++ tst1000.stable.out  12 Oct 2007 17:40:05 -0000      1.28
@@ -27,8 +27,8 @@
     b := bat.new(:int,:int);   # 2 CMDBATnew 
(b:bat[:int,:int])<-(_3:int)(_3:int)
     bat.insert(b,1,2); # 3 BKCinsert_bun 
(_4:void)<-(b:bat[:int,:int])(_5:int)(_6:int)
     bat.setName(b,"mybat");    # 4 BKCsetName 
(_7:void)<-(b:bat[:int,:int])(_8:str)
-    c := bbp.bind("mybat");    # 5 CMDbbpbind (c:bat[:any,:any])<-(_8:str)
-    io.print(c);       # 6 IOprint_val (_10:void)<-(c:bat[:any,:any])
+    c:bat[:int,:int]  := bbp.bind("mybat");    # 5 CMDbbpbind 
(c:bat[:int,:int])<-(_8:str)
+    io.print(c);       # 6 IOprint_val (_10:void)<-(c:bat[:int,:int])
 end main;      # 7  
 #-----------------#
 # h    mybat     # name

Index: tst2560.mal
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/Tests/tst2560.mal,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- tst2560.mal 28 Dec 2006 22:16:10 -0000      1.4
+++ tst2560.mal 12 Oct 2007 17:40:05 -0000      1.5
@@ -13,8 +13,8 @@
 io.print(s);
 
 factory view1(l:int,h:int):bat[:oid,:str];
-a:bat[:oid,:int] := bbp.find("emp","age");
-b:bat[:oid,:str] := bbp.find("emp","name");
+a:bat[:oid,:int] := bbp.bind("emp","age");
+b:bat[:oid,:str] := bbp.bind("emp","name");
 barrier always:= true;
        lOld:= l;
        hOld:= h;

Index: tst610.mal
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/Tests/tst610.mal,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- tst610.mal  14 May 2007 17:00:22 -0000      1.16
+++ tst610.mal  12 Oct 2007 17:40:05 -0000      1.17
@@ -20,7 +20,7 @@
 io.print("open box");
 bbp.open();
 #user.refs();
-t:bat[:any_1,:any_2]:= bbp.bind("tasks");
+t:bat[:int,:int]:= bbp.bind("tasks");
 io.print(t);
 bbp.release(t);
 #user.refs();
@@ -31,7 +31,7 @@
 # the bat is still visible, because the destroy only
 # marks it for deletion at the end of session or
 # when the reference counters drop to zero
-t:bat[:any_1,:any_2]:= bbp.bind("tasks");
+t:bat[:int,:int]:= bbp.bind("tasks");
 #user.refs();
 # to really remove, we get rid of the current
 # references as well

Index: tst2560.stable.out
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/Tests/tst2560.stable.out,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- tst2560.stable.out  28 Dec 2006 22:16:10 -0000      1.5
+++ tst2560.stable.out  12 Oct 2007 17:40:05 -0000      1.6
@@ -48,8 +48,8 @@
 #exit always;
 #end view1;
 factory user.view1(l:int,h:int):bat[:oid,:str];        # 0  
(view1:bat[:oid,:str])<-(l:int)(h:int)
-    a:bat[:oid,:int]  := bbp.find("emp","age");        # 1 CMDbbpfind2 
(a:bat[:oid,:int])<-(_4:str)(_5:str)
-    b:bat[:oid,:str]  := bbp.find("emp","name");       # 2 CMDbbpfind2 
(b:bat[:oid,:str])<-(_4:str)(_7:str)
+    a:bat[:oid,:int]  := bbp.bind("emp","age");        # 1 CMDbbpbind2 
(a:bat[:oid,:int])<-(_4:str)(_5:str)
+    b:bat[:oid,:str]  := bbp.bind("emp","name");       # 2 CMDbbpbind2 
(b:bat[:oid,:str])<-(_4:str)(_7:str)
 barrier always := true;        # 3  (always:bit)<-(_9:bit) jump 17
     lOld := l; # 4  (lOld:int)<-(l:int)
     hOld := h; # 5  (hOld:int)<-(h:int)
@@ -133,6 +133,7 @@
 [ [EMAIL PROTECTED],     "B"     ]
 [ [EMAIL PROTECTED],     "C"     ]
 
+
 # 11:22:26 >  
 # 11:22:26 >  Done.
 # 11:22:26 >  


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to