pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/sr/patches Add test case for pointer-string and s...
details: https://anonhg.NetBSD.org/pkgsrc/rev/0f679f5aaacb
branches: trunk
changeset: 490471:0f679f5aaacb
user: is <is%pkgsrc.org@localhost>
date: Fri Mar 11 23:24:14 2005 +0000
description:
Add test case for pointer-string and string-pointer conversions.
diffstat:
lang/sr/patches/patch-bd | 14 +++++++++-----
lang/sr/patches/patch-be | 34 +++++++++++++++++++---------------
lang/sr/patches/patch-bf | 10 +++++-----
3 files changed, 33 insertions(+), 25 deletions(-)
diffs (97 lines):
diff -r 718b958c2489 -r 0f679f5aaacb lang/sr/patches/patch-bd
--- a/lang/sr/patches/patch-bd Fri Mar 11 23:24:13 2005 +0000
+++ b/lang/sr/patches/patch-bd Fri Mar 11 23:24:14 2005 +0000
@@ -1,9 +1,13 @@
-$NetBSD: patch-bd,v 1.1 2005/03/09 20:38:26 is Exp $
+$NetBSD: patch-bd,v 1.2 2005/03/11 23:24:14 is Exp $
---- /dev/null 2005-03-09 09:35:26.000000000 +0100
+--- vsuite/quick/ptrstr/No_input.std.orig 2005-03-11 09:46:24.000000000 +0100
+++ vsuite/quick/ptrstr/No_input.std
-@@ -0,0 +1,4 @@
+@@ -0,0 +1,8 @@
+Testing pointer-string-pointer conversions:
+Null pointer: ==null== ; string: ==null== ; int: 0 ; pt(==null==): ==null==
-+pointer identity: true
-+string identity: true
++pointer identity: true
++string identity: true
++pointerX identity: true
++Expect invalid conversion:
++RTS abort: file pointer.sr, line 31:
++ illegal conversion: pointer("invalid")
diff -r 718b958c2489 -r 0f679f5aaacb lang/sr/patches/patch-be
--- a/lang/sr/patches/patch-be Fri Mar 11 23:24:13 2005 +0000
+++ b/lang/sr/patches/patch-be Fri Mar 11 23:24:14 2005 +0000
@@ -1,18 +1,16 @@
-$NetBSD: patch-be,v 1.1 2005/03/09 20:38:26 is Exp $
+$NetBSD: patch-be,v 1.2 2005/03/11 23:24:14 is Exp $
---- /dev/null 2005-03-09 09:35:53.000000000 +0100
+--- vsuite/quick/ptrstr/pointer.sr.orig 2005-03-11 09:46:25.000000000 +0100
+++ vsuite/quick/ptrstr/pointer.sr
-@@ -0,0 +1,29 @@
-+resource hello()
+@@ -0,0 +1,33 @@
++resource pointer()
+ type pt = ptr int
-+ type pa = ptr [1:2]int
-+ var foo: pa
-+ var bar: pa
-+ var baz: pa
-+ var nul: pa
++ var foo: pt
++ var bar: pt
++ var baz: pt
++ var nul: pt
+ var foos: string[20]
+ var bars: string[20]
-+ var anint: int
+
+ write("Testing pointer-string-pointer conversions:")
+
@@ -20,15 +18,21 @@
+ write("Null pointer:", nul, "; string:", string(nul),
+ "; int:", int(nul), "; pt(==null==):", pt("==null=="))
+
-+ baz := new([1:2]int)
++ baz := new(int)
+
-+ foo := new([1:2]int)
++ foo := new(int)
+ foos:= string(foo)
+
-+ bar := pa(foos||"x")
++ bar := pt(foos)
+ bars:= string(bar)
+
-+ write("pointer identity:", foo = bar)
-+ write("string identity:", foos = bars)
++ baz := pt(foos||"X")
++
++ write("pointer identity:", foo = bar)
++ write("string identity:", foos = bars)
++ write("pointerX identity:", foo = baz)
++
++ write("Expect invalid conversion:")
++ baz := pt("invalid")
+
+end
diff -r 718b958c2489 -r 0f679f5aaacb lang/sr/patches/patch-bf
--- a/lang/sr/patches/patch-bf Fri Mar 11 23:24:13 2005 +0000
+++ b/lang/sr/patches/patch-bf Fri Mar 11 23:24:14 2005 +0000
@@ -1,9 +1,9 @@
-$NetBSD: patch-bf,v 1.1 2005/03/09 20:38:26 is Exp $
+$NetBSD: patch-bf,v 1.2 2005/03/11 23:24:14 is Exp $
---- /dev/null 2005-03-09 09:36:06.000000000 +0100
+--- vsuite/quick/ptrstr/Script.orig 2005-03-11 09:46:25.000000000 +0100
+++ vsuite/quick/ptrstr/Script
@@ -0,0 +1,4 @@
-+# ignatios Wed Mar 9 09:17:45 CET 2005
-+0 sr /usr/home/is/srtest/pointer.sr
-+0 run
++# ignatios Fri Mar 11 10:07:24 CET 2005
++0 sr pointer.sr
++1 run
+0 rm -rf Interfaces core *.out
Home |
Main Index |
Thread Index |
Old Index