diff options
author | Wilfried Moser <moser@cygnus> | 1996-09-04 14:34:15 +0000 |
---|---|---|
committer | Wilfried Moser <moser@cygnus> | 1996-09-04 14:34:15 +0000 |
commit | 9811b596028324839745905983ae940ae988f8cd (patch) | |
tree | 2e6d40ea45f28caa4a33e0e1c370e4651de06393 | |
parent | b5865bb26302045a3ff07bdb12ff1441827b61f7 (diff) | |
download | gdb-9811b596028324839745905983ae940ae988f8cd.zip gdb-9811b596028324839745905983ae940ae988f8cd.tar.gz gdb-9811b596028324839745905983ae940ae988f8cd.tar.bz2 |
* gch1272.{ch,exp}, gch1280.{ch,exp}, pr-9946.{ch,exp}:
New test cases.
-rw-r--r-- | gdb/testsuite/gdb.chill/.Sanitize | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/gch1272.ch | 21 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/gch1272.exp | 86 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/gch1280.ch | 13 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/gch1280.exp | 73 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/pr-9946.ch | 10 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/pr-9946.exp | 79 |
8 files changed, 293 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.chill/.Sanitize b/gdb/testsuite/gdb.chill/.Sanitize index 11c9ab5..2976ca9 100644 --- a/gdb/testsuite/gdb.chill/.Sanitize +++ b/gdb/testsuite/gdb.chill/.Sanitize @@ -46,6 +46,10 @@ gch981.ch gch981.exp gch1041.ch gch1041.exp +gch1272.ch +gch1272.exp +gch1280.ch +gch1280.exp misc.ch misc.exp powerset.ch @@ -81,6 +85,8 @@ pr-8894-grt.ch pr-8894.exp pr-9095.ch pr-9095.exp +pr-9946.ch +pr-9946.exp result.ch result.exp string.ch diff --git a/gdb/testsuite/gdb.chill/ChangeLog b/gdb/testsuite/gdb.chill/ChangeLog index 3f90c652..aafa661 100644 --- a/gdb/testsuite/gdb.chill/ChangeLog +++ b/gdb/testsuite/gdb.chill/ChangeLog @@ -1,3 +1,8 @@ +Wed Sep 4 07:30:44 1996 Wilfried Moser (Alcatel) <moser@rtl.cygnus.com> + + * gch1272.{ch,exp}, gch1280.{ch,exp}, pr-9946.{ch,exp}: + New test cases. + Sun Aug 18 13:29:48 1996 Fred Fish <fnf@cygnus.com> * tests2.exp: Remove mips-sgi-irix* setup_xfail for diff --git a/gdb/testsuite/gdb.chill/gch1272.ch b/gdb/testsuite/gdb.chill/gch1272.ch new file mode 100644 index 0000000..6112d4b --- /dev/null +++ b/gdb/testsuite/gdb.chill/gch1272.ch @@ -0,0 +1,21 @@ +gch1272: MODULE + +SYNMODE m_array = ARRAY (0:99) INT; +DCL foo m_array; + +SYNMODE m_xxx = ARRAY (1:10) LONG; + +SYNMODE m_struct = STRUCT (i LONG, b BOOL); +SYNMODE m_bar = ARRAY (-10:20) m_struct; +DCL bar m_bar; + +SYNMODE m_ps = POWERSET LONG (0:20); + +brrr: PROC () +END; + +foo := [ (*): 222 ]; + +brrr (); + +END gch1272; diff --git a/gdb/testsuite/gdb.chill/gch1272.exp b/gdb/testsuite/gdb.chill/gch1272.exp new file mode 100644 index 0000000..4eb78c2 --- /dev/null +++ b/gdb/testsuite/gdb.chill/gch1272.exp @@ -0,0 +1,86 @@ +# Copyright (C) 1995 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +# Please email any bugs, comments, and/or additions to this file to: +# bug-gdb@prep.ai.mit.edu + +# This file was written by Wilfried Moser (moser@aut.alcatel.at) +# + +if $tracelevel then { + strace $tracelevel +} + +if [skip_chill_tests] then { continue } + +set testfile "gch1272" +set srcfile ${srcdir}/$subdir/${testfile}.ch +set binfile ${objdir}/${subdir}/${testfile}.exe +if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } { + perror "Couldn't compile ${srcfile}" + return -1 +} + +# Set the current language to chill. This counts as a test. If it +# fails, then we skip the other tests. + +proc set_lang_chill {} { + global prompt + global binfile objdir subdir + + verbose "loading file '$binfile'" + gdb_load $binfile + + send "set language chill\n" + expect { + -re ".*$prompt $" {} + timeout { fail "set language chill (timeout)" ; return 0 } + } + + return [gdb_test "show language" ".* source language is \"chill\".*" \ + "set language to \"chill\""] +} + +set prms_id 0 +set bug_id 0 + +# Start with a fresh gdb. + +gdb_exit +gdb_start +gdb_reinitialize_dir $srcdir/$subdir + +send "set print sevenbit-strings\n" ; expect -re ".*$prompt $" + +if ![set_lang_chill] then { + runto brrr + + # check foo + gdb_test {print foo} { = \[\(0:99\): 222\]} + send "set var foo := m_array\[\(\*\):44\]\n" ; expect -re ".*$prompt $" + gdb_test {print foo} { = \[\(0:99\): 44\]} + + # check bar + gdb_test {print bar} { = \[\(-10:20\): \[.i: 0, .b: FALSE\]\]} + send "set var bar := m_bar\[\(\*\): \[42, TRUE\]\]\n" ; expect -re ".*$prompt $" + gdb_test {print bar} { = \[\(-10:20\): \[.i: 42, .b: TRUE\]\]} + + # some failues + gdb_test "set var foo := \[\(\*\):44\]" {\(\*\) only possible with modename in front of tuple \(mode\[\.\.\]\)} + gdb_test "set var foo := m_xxx\[\(\*\):44\]" {Invalid cast\.} + gdb_test "set var foo := m_struct\[\(\*\):44\]" {\(\*\) in invalid context} + gdb_test "set var foo := m_ps\[\(\*\):44\]" {\(\*\) in invalid context} +} diff --git a/gdb/testsuite/gdb.chill/gch1280.ch b/gdb/testsuite/gdb.chill/gch1280.ch new file mode 100644 index 0000000..3fba71f --- /dev/null +++ b/gdb/testsuite/gdb.chill/gch1280.ch @@ -0,0 +1,13 @@ +gch1280: MODULE + +SYNMODE m_x = ARRAY (1:3) LONG; +DCL v_x m_x; +DCL v_xx m_x; + +doit: PROC () +END doit; + +v_x := [ 11, 12, 13 ]; +doit (); + +END gch1280; diff --git a/gdb/testsuite/gdb.chill/gch1280.exp b/gdb/testsuite/gdb.chill/gch1280.exp new file mode 100644 index 0000000..6089819 --- /dev/null +++ b/gdb/testsuite/gdb.chill/gch1280.exp @@ -0,0 +1,73 @@ +# Copyright (C) 1995 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +# Please email any bugs, comments, and/or additions to this file to: +# bug-gdb@prep.ai.mit.edu + +# This file was written by Wilfried Moser (moser@aut.alcatel.at) +# + +if $tracelevel then { + strace $tracelevel +} + +if [skip_chill_tests] then { continue } + +set testfile "gch1280" +set srcfile ${srcdir}/$subdir/${testfile}.ch +set binfile ${objdir}/${subdir}/${testfile}.exe +if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } { + perror "Couldn't compile ${srcfile}" + return -1 +} + +# Set the current language to chill. This counts as a test. If it +# fails, then we skip the other tests. + +proc set_lang_chill {} { + global prompt + global binfile objdir subdir + + verbose "loading file '$binfile'" + gdb_load $binfile + + send "set language chill\n" + expect { + -re ".*$prompt $" {} + timeout { fail "set language chill (timeout)" ; return 0 } + } + + return [gdb_test "show language" ".* source language is \"chill\".*" \ + "set language to \"chill\""] +} + +set prms_id 0 +set bug_id 0 + +# Start with a fresh gdb. + +gdb_exit +gdb_start +gdb_reinitialize_dir $srcdir/$subdir + +send "set print sevenbit-strings\n" ; expect -re ".*$prompt $" + +if ![set_lang_chill] then { + runto doit + send "next\n" ; expect -re "$prompt $" + # check too many array elements + gdb_test {set var v_x := [1,2,3,4,5]} {Too many array elements} +} diff --git a/gdb/testsuite/gdb.chill/pr-9946.ch b/gdb/testsuite/gdb.chill/pr-9946.ch new file mode 100644 index 0000000..3d9210a --- /dev/null +++ b/gdb/testsuite/gdb.chill/pr-9946.ch @@ -0,0 +1,10 @@ +x: module + +synmode aset = SET (stopped, moving); + +DCL xyz aset; + +xyz := moving; +xyz := SUCC (xyz); + +END x; diff --git a/gdb/testsuite/gdb.chill/pr-9946.exp b/gdb/testsuite/gdb.chill/pr-9946.exp new file mode 100644 index 0000000..dce73df --- /dev/null +++ b/gdb/testsuite/gdb.chill/pr-9946.exp @@ -0,0 +1,79 @@ +# Copyright (C) 1995 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +# Please email any bugs, comments, and/or additions to this file to: +# bug-gdb@prep.ai.mit.edu + +# This file was written by Fred Fish. (fnf@cygnus.com) +# Martin Pottendorfer (pottendo@aut.alcatel.at) +# + +if $tracelevel then { + strace $tracelevel +} + +if [skip_chill_tests] then { continue } + +set testfile "pr-9946" +set srcfile ${srcdir}/$subdir/${testfile}.ch +set binfile ${objdir}/${subdir}/${testfile}.exe +if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } { + perror "Couldn't compile ${srcfile}" + return -1 +} + +# Set the current language to chill. This counts as a test. If it +# fails, then we skip the other tests. + +proc set_lang_chill {} { + global prompt + global binfile objdir subdir + + verbose "loading file '$binfile'" + gdb_load $binfile + + send "set language chill\n" + expect { + -re ".*$prompt $" {} + timeout { fail "set language chill (timeout)" ; return 0 } + } + + return [gdb_test "show language" ".* source language is \"chill\".*" \ + "set language to \"chill\""] +} + +set prms_id 0 +set bug_id 0 + +# Start with a fresh gdb. + +gdb_exit +gdb_start +gdb_reinitialize_dir $srcdir/$subdir + +send "set print sevenbit-strings\n" ; expect -re ".*$prompt $" + +if ![set_lang_chill] then { + runto x_ + send "next\n" ; expect -re "$prompt $" + # check comparison of SET's + gdb_test {print xyz=moving} { = TRUE} + gdb_test {print xyz/=moving} { = FALSE} + gdb_test {print xyz<moving} { = FALSE} + gdb_test {print xyz<=moving} { = TRUE} + gdb_test {print xyz>moving} { = FALSE} + gdb_test {print xyz>=moving} { = TRUE} +} |