+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.
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;
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 $"
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 $"