diff options
Diffstat (limited to 'dx/tests/016-field-attrib-Deprecated')
-rw-r--r-- | dx/tests/016-field-attrib-Deprecated/expected.txt | 36 | ||||
-rw-r--r-- | dx/tests/016-field-attrib-Deprecated/info.txt | 6 | ||||
-rw-r--r-- | dx/tests/016-field-attrib-Deprecated/run | 17 | ||||
-rw-r--r-- | dx/tests/016-field-attrib-Deprecated/small-class.txt | 38 |
4 files changed, 97 insertions, 0 deletions
diff --git a/dx/tests/016-field-attrib-Deprecated/expected.txt b/dx/tests/016-field-attrib-Deprecated/expected.txt new file mode 100644 index 0000000..1b5547f --- /dev/null +++ b/dx/tests/016-field-attrib-Deprecated/expected.txt @@ -0,0 +1,36 @@ +reading small-class.txt... +begin classfile +magic: cafebabe +minor_version: 0000 +major_version: 002e +constant_pool_count: 0008 + +constant_pool: + 0001: utf8{"Small"} + 0002: utf8{"java/lang/Object"} + 0003: type{Small} + 0004: type{java.lang.Object} + 0005: utf8{"Deprecated"} + 0006: utf8{"a"} + 0007: utf8{"I"} +end constant_pool +access_flags: public|super +this_class: type{Small} +super_class: type{java.lang.Object} +interfaces_count: 0000 +fields_count: 0001 + +fields[0]: + access_flags: public + name: a + descriptor: I + attributes_count: 0001 + + attributes[0]: + name: Deprecated + length: 00000000 + end attributes[0] +end fields[0] +methods_count: 0000 +attributes_count: 0000 +end classfile diff --git a/dx/tests/016-field-attrib-Deprecated/info.txt b/dx/tests/016-field-attrib-Deprecated/info.txt new file mode 100644 index 0000000..1185981 --- /dev/null +++ b/dx/tests/016-field-attrib-Deprecated/info.txt @@ -0,0 +1,6 @@ +This is a dump of a simple class which is valid in structure but is overall +invalid. That being said, the system should still have no trouble parsing and +dumping it. + +The salient bit of parsing tested here is that the class has a single +field with a valid Deprecated attribute. diff --git a/dx/tests/016-field-attrib-Deprecated/run b/dx/tests/016-field-attrib-Deprecated/run new file mode 100644 index 0000000..1c759d6 --- /dev/null +++ b/dx/tests/016-field-attrib-Deprecated/run @@ -0,0 +1,17 @@ +#!/bin/bash +# +# Copyright (C) 2007 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +dx --debug --dump --width=200 small-class.txt diff --git a/dx/tests/016-field-attrib-Deprecated/small-class.txt b/dx/tests/016-field-attrib-Deprecated/small-class.txt new file mode 100644 index 0000000..2448ce4 --- /dev/null +++ b/dx/tests/016-field-attrib-Deprecated/small-class.txt @@ -0,0 +1,38 @@ +# +# sample small-but-valid classfile +# + +cafe babe # magic +0000 # minor_version +002e # major_version +0008 # constant_pool_count + +# +# constant_pool +# +01 0005 "Small" # 0001: utf8["Small"] +01 0010 "java/lang/Object" # 0002: utf8["java/lang/Object"] +07 0001 # 0003: class[Small] +07 0002 # 0004: class[java/lang/Object] +01 000a "Deprecated" # 0005: utf8["Deprecated"] +01 0001 "a" # 0006: utf8["a"] +01 0001 "I" # 0007: utf8["I"] + +0021 # access_flags +0003 # this_class +0004 # super_class +0000 # interfaces_count + +0001 # fields_count + +# fields[0] +0001 # access_flags +0006 # "a" +0007 # "I" +0001 # attributes_count +# attributes[0] +0005 # name +00000000 # length + +0000 # methods_count +0000 # attributes_count |