diff options
author | Doug Evans <xdje42@gmail.com> | 2014-07-26 17:01:09 -0700 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2014-07-26 17:03:04 -0700 |
commit | 186fcde0c6134aed28526d925b1360db95d47171 (patch) | |
tree | 1b70abc1341a15e51c24c958bd5ca07a892d207b /gdb/testsuite | |
parent | 4122867a4227d29b46377c2a44eae803a482d89f (diff) | |
download | gdb-186fcde0c6134aed28526d925b1360db95d47171.zip gdb-186fcde0c6134aed28526d925b1360db95d47171.tar.gz gdb-186fcde0c6134aed28526d925b1360db95d47171.tar.bz2 |
PR guile/17146 preparatory work.
* data-directory/Makefile.in (GUILE_FILES): Add support.scm.
* guile/lib/gdb/support.scm: New file.
* guile/guile.c (gdbscm_init_module_name): Change to "gdb".
* guile/lib/gdb.scm: Load gdb/init.scm as an include file.
All uses updated.
* guile/lib/gdb/init.scm (SCM_ARG1, SCM_ARG2): Moved to support.scm.
All uses updated.
(%assert-type): Ditto, and renamed to assert-type.
(%exception-print-style): Delete.
testsuite/
* gdb.guile/types-module.exp: Add tests for wrong type arguments.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.guile/types-module.exp | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index e088b9b..f64371c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-07-26 Ludovic Courtès <ludo@gnu.org> + Doug Evans <xdje42@gmail.com> + + PR guile/17146 + * gdb.guile/types-module.exp: Add tests for wrong type arguments. + 2014-07-25 Pedro Alves <palves@redhat.com> * gdb.threads/signal-command-handle-nopass.c: New file. diff --git a/gdb/testsuite/gdb.guile/types-module.exp b/gdb/testsuite/gdb.guile/types-module.exp index 8562f3c..4dd5ee4 100644 --- a/gdb/testsuite/gdb.guile/types-module.exp +++ b/gdb/testsuite/gdb.guile/types-module.exp @@ -43,8 +43,20 @@ gdb_test "guile (print (type-has-field? d \"base_member\"))" \ gdb_test "guile (print (type-has-field-deep? d \"base_member\"))" \ "= #t" "type-has-field-deep? member in baseclass" +gdb_test "guile (print (type-has-field-deep? (lookup-type \"int\") \"base_member\"))" \ + "ERROR: .*Wrong type argument in position 1 \\(expecting struct or union\\): #<gdb:type int>.*" \ + "type-has-field-deep? from int" + gdb_scm_test_silent_cmd "guile (define enum-htab (make-enum-hashtable (lookup-type \"enum_type\")))" \ "create enum hash table" gdb_test "guile (print (hash-ref enum-htab \"B\"))" \ "= 1" "verify make-enum-hashtable" + +gdb_test "guile (define bad-enum-htab (make-enum-hashtable #f))" \ + "ERROR: .*Wrong type argument in position 1 \\(expecting gdb:type\\): #f.*" \ + "make-enum-hashtable from #f" + +gdb_test "guile (define bad-enum-htab (make-enum-hashtable (lookup-type \"int\")))" \ + "ERROR: .*Wrong type argument in position 1 \\(expecting enum\\): #<gdb:type int>.*" \ + "make-enum-hashtable from int" |