aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/gdb.chill/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.chill/tuples.ch9
-rw-r--r--gdb/testsuite/gdb.chill/tuples.exp6
3 files changed, 19 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.chill/ChangeLog b/gdb/testsuite/gdb.chill/ChangeLog
index 8a96268..310670b 100644
--- a/gdb/testsuite/gdb.chill/ChangeLog
+++ b/gdb/testsuite/gdb.chill/ChangeLog
@@ -1,3 +1,8 @@
+Wed Sep 27 11:51:50 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * tuples.ch. tuples.exp: Add new test for setting a variant record
+ using a tuple, and access the fields.
+
Thu Aug 3 10:45:37 1995 Fred Fish <fnf@cygnus.com>
* Update all FSF addresses except those in COPYING* files.
diff --git a/gdb/testsuite/gdb.chill/tuples.ch b/gdb/testsuite/gdb.chill/tuples.ch
index 399773a..83381eb 100644
--- a/gdb/testsuite/gdb.chill/tuples.ch
+++ b/gdb/testsuite/gdb.chill/tuples.ch
@@ -28,6 +28,15 @@ DCL j r1 := 4;
DCL i INT;
+newmode vstruct = struct (a, b long,
+ case b of
+ (42): ch8 chars(20),
+ (52): i long
+ else ch1 char
+ esac);
+
+DCL vstr vstruct := [ .a: 10, .b: 52, .i: 100 ];
+
i := 0;
END x;
diff --git a/gdb/testsuite/gdb.chill/tuples.exp b/gdb/testsuite/gdb.chill/tuples.exp
index f05a466..eda79da 100644
--- a/gdb/testsuite/gdb.chill/tuples.exp
+++ b/gdb/testsuite/gdb.chill/tuples.exp
@@ -38,7 +38,7 @@ proc do_tests {} {
send "set language chill\n" ; expect -re "$prompt $"
- runto tuples.ch:31
+ runto tuples.ch:40
gdb_test_exact "print v_arri" {= [(1): -1, (2): -2, (3): -3, (4): -4, (5): -5]}
send "set v_arri := \[ 33, 44, 55, 66, 77 \]\n" ; expect -re "$prompt $"
@@ -98,6 +98,10 @@ proc do_tests {} {
expect -re "$prompt $"
gdb_test_exact "print v_arrbool" {= [(1): FALSE, (2:4): TRUE, (5): FALSE]} "v_arrbool after slice assignment 2"
+ send "set vstr := \[ .a: 2+3, .b: 12, .ch1: 'x' \]\n"
+ expect -re "$prompt $"
+ gdb_test_exact "print vstr.a" {= 5} "vstr.a after assignment"
+ gdb_test_exact "print vstr.ch1" {= 'x'} "vstr.ch1 after assignment"
# These tests are from Cygnus PR chill/5024:
send "break printdow\n" ; expect -re "$prompt $"