* gdb.fortran/exprs.exp (test_arithmetic_expressions): Add five
authorWu Zhou <woodzltc@cn.ibm.com>
Wed, 6 Jul 2005 06:11:54 +0000 (06:11 +0000)
committerWu Zhou <woodzltc@cn.ibm.com>
Wed, 6 Jul 2005 06:11:54 +0000 (06:11 +0000)
tests to evaluate exponentiation expression.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/exprs.exp

index 1a523d3c9f04d294e92c5066e9cb649dd7e58688..bc57d7fb0bdf76813ef1d57330b825baf11c2d28 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-06  Wu Zhou  <woodzltc@cn.ibm.com>
+
+       * gdb.fortran/exprs.exp (test_arithmetic_expressions): Add five
+       tests to evaluate exponentiation expression.
+
 2005-06-29  Andreas Schwab  <schwab@suse.de>
 
        * gdb.base/sigrepeat.c: Include <stdlib.h> and add return type for
index 32742b997eccf0ab72dcf4361879ada692dbea8c..c9703999ce4ce957f505e324d9971e01b715fc3f 100644 (file)
@@ -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.
This page took 0.032062 seconds and 4 git commands to generate.