~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to binutils/libiberty/testsuite/regress-demangle

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
# Run a regression test for the demangler.
 
4
# Usage: regress-demangle TEST-FILE
 
5
 
 
6
failures=0
 
7
count=0
 
8
sed -e '/^#/ d' "$1" | (
 
9
  while read type; do
 
10
     read mangled
 
11
     read demangled
 
12
 
 
13
     x="`./test-filter $type $mangled`"
 
14
     count=`expr $count + 1`
 
15
     if test "x$x" != "x$demangled"; then
 
16
        failures=`expr $failures + 1`
 
17
        echo "FAIL: $type $mangled"
 
18
        echo "   result: $x"
 
19
        echo " expected: $demangled"
 
20
     fi
 
21
  done
 
22
 
 
23
  if test $failures -eq 0; then
 
24
     echo "All $count tests passed"
 
25
  else
 
26
     echo "$failures of $count tests failed"
 
27
  fi
 
28
 
 
29
  test $failures -eq 0
 
30
)