aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.fortran
diff options
context:
space:
mode:
authorWu Zhou <woodzltc@cn.ibm.com>2005-07-06 06:11:54 +0000
committerWu Zhou <woodzltc@cn.ibm.com>2005-07-06 06:11:54 +0000
commita0c5fbcf0e1c6fdb3672d3bfc071b1a57a7b27bf (patch)
treebf24bed93b87cea0e4c52254d875ea11dc9f7c96 /gdb/testsuite/gdb.fortran
parent2d296aac7e450641eb0c1cc9b7985dc99528f233 (diff)
downloadgdb-a0c5fbcf0e1c6fdb3672d3bfc071b1a57a7b27bf.zip
gdb-a0c5fbcf0e1c6fdb3672d3bfc071b1a57a7b27bf.tar.gz
gdb-a0c5fbcf0e1c6fdb3672d3bfc071b1a57a7b27bf.tar.bz2
* gdb.fortran/exprs.exp (test_arithmetic_expressions): Add five
tests to evaluate exponentiation expression.
Diffstat (limited to 'gdb/testsuite/gdb.fortran')
-rw-r--r--gdb/testsuite/gdb.fortran/exprs.exp10
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.fortran/exprs.exp b/gdb/testsuite/gdb.fortran/exprs.exp
index 32742b9..c970399 100644
--- a/gdb/testsuite/gdb.fortran/exprs.exp
+++ b/gdb/testsuite/gdb.fortran/exprs.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1997, 2005 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
@@ -250,6 +250,14 @@ proc test_arithmetic_expressions {} {
# Test modulo with various operands
+ # Test exponentiation with various operands
+
+ gdb_test "p 2 ** 3" " = 8" "int powered by int"
+ gdb_test "p 2 ** 2 ** 3" " = 256" "combined exponentiation expression"
+ gdb_test "p (2 ** 2) ** 3" " = 64" "combined exponentiation expression in specified order"
+ gdb_test "p 4 ** 0.5" " = 2" "int powered by real"
+ gdb_test "p 4.0 ** 0.5" " = 2" "real powered by real"
+
}
# Start with a fresh gdb.