aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-template.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.python/py-template.exp')
-rw-r--r--gdb/testsuite/gdb.python/py-template.exp4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-template.exp b/gdb/testsuite/gdb.python/py-template.exp
index 793e68d..96383a7 100644
--- a/gdb/testsuite/gdb.python/py-template.exp
+++ b/gdb/testsuite/gdb.python/py-template.exp
@@ -54,6 +54,10 @@ proc test_template_arg {exefile type} {
# Replace '*' with '\*' in regex.
regsub -all {\*} $type {\*} t
gdb_test "python print (foo.type.template_argument(0))" $t $type
+
+ gdb_test "python print(foo.type.template_argument(-1))" \
+ "Template argument number must be non-negative\r\nError while executing Python code." \
+ "negative template argument number"
}
test_template_arg "${binfile}-ci" "const int"