1#!/bin/bash
2#
3# Copyright (C) 2007 The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9#     http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17# The tests that don't specify "--debug" are expected to
18# throw exceptions.  If --debug is on we'll get a stack
19# trace, which is unpredictable and doesn't work well with
20# expected.txt vs. out.txt comparisons.
21
22# Bad magic (throws an expection)
23dx         --dump --strict class-bad-magic.txt
24
25# Too small (throws an exception)
26dx         --dump --strict class-version-44.0.txt
27dx         --dump --strict class-version-44.65535.txt
28
29# Just right
30dx --debug --dump --width=100 class-version-45.0.txt
31dx --debug --dump --width=100 class-version-45.65535.txt
32dx --debug --dump --width=100 class-version-48.0.txt
33dx --debug --dump --width=100 class-version-48.65535.txt
34dx --debug --dump --width=100 class-version-49.0.txt
35dx --debug --dump --width=100 class-version-49.1.txt
36dx --debug --dump --width=100 class-version-49.65535.txt
37dx --debug --dump --width=100 class-version-50.0.txt
38
39# Too big (throws an exception)
40dx         --dump --strict class-version-50.1.txt
41dx         --dump --strict class-version-50.65535.txt
42dx         --dump --strict class-version-51.0.txt
43
44# Show that we can dump the access flags even when they
45# don't make any sense.
46dx --debug --dump --width=100 small-class.txt
47