Handle void * conversions in FreeBSD/x86 native code to fix C++ build.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.guile / types-module.exp
index 8562f3ccc6812108f1f22ec7c2b056734311f60c..7a1c20d2a78ae28cdeb90b9fcc3507aab8d77316 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2014 Free Software Foundation, Inc.
+# Copyright (C) 2014-2016 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
@@ -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"
This page took 0.024303 seconds and 4 git commands to generate.