diff options
Diffstat (limited to 'dx/tests/003-magic-version-access')
18 files changed, 0 insertions, 679 deletions
diff --git a/dx/tests/003-magic-version-access/class-bad-magic.txt b/dx/tests/003-magic-version-access/class-bad-magic.txt deleted file mode 100644 index f3c64bd0a..000000000 --- a/dx/tests/003-magic-version-access/class-bad-magic.txt +++ /dev/null @@ -1,25 +0,0 @@ -# -# classfile with a bad magic value -# - -dead babe # magic -0000 # minor_version -0031 # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count diff --git a/dx/tests/003-magic-version-access/class-version-44.0.txt b/dx/tests/003-magic-version-access/class-version-44.0.txt deleted file mode 100644 index 2d9055c61..000000000 --- a/dx/tests/003-magic-version-access/class-version-44.0.txt +++ /dev/null @@ -1,25 +0,0 @@ -# -# classfile with an out-of-range version. -# - -cafe babe # magic -0000 # minor_version -002c # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count diff --git a/dx/tests/003-magic-version-access/class-version-44.65535.txt b/dx/tests/003-magic-version-access/class-version-44.65535.txt deleted file mode 100644 index 0f2b5823f..000000000 --- a/dx/tests/003-magic-version-access/class-version-44.65535.txt +++ /dev/null @@ -1,25 +0,0 @@ -# -# classfile with an out-of-range version. -# - -cafe babe # magic -ffff # minor_version -002c # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count diff --git a/dx/tests/003-magic-version-access/class-version-45.0.txt b/dx/tests/003-magic-version-access/class-version-45.0.txt deleted file mode 100644 index 335079d9a..000000000 --- a/dx/tests/003-magic-version-access/class-version-45.0.txt +++ /dev/null @@ -1,25 +0,0 @@ -# -# classfile with the lowest valid version, 45.0 (0x2d.0x00) -# - -cafe babe # magic -0000 # minor_version -002d # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count diff --git a/dx/tests/003-magic-version-access/class-version-45.65535.txt b/dx/tests/003-magic-version-access/class-version-45.65535.txt deleted file mode 100644 index 2b3140423..000000000 --- a/dx/tests/003-magic-version-access/class-version-45.65535.txt +++ /dev/null @@ -1,25 +0,0 @@ -# -# classfile with the valid version 45.65535 (0x2d.0xffff) -# - -cafe babe # magic -ffff # minor_version -002d # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count diff --git a/dx/tests/003-magic-version-access/class-version-48.0.txt b/dx/tests/003-magic-version-access/class-version-48.0.txt deleted file mode 100644 index 551b221c1..000000000 --- a/dx/tests/003-magic-version-access/class-version-48.0.txt +++ /dev/null @@ -1,25 +0,0 @@ -# -# classfile with the valid version 48.0 (0x30.0x00) -# - -cafe babe # magic -0000 # minor_version -0030 # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count diff --git a/dx/tests/003-magic-version-access/class-version-48.65535.txt b/dx/tests/003-magic-version-access/class-version-48.65535.txt deleted file mode 100644 index ac95b52d9..000000000 --- a/dx/tests/003-magic-version-access/class-version-48.65535.txt +++ /dev/null @@ -1,25 +0,0 @@ -# -# classfile with the valid version 48.65535 (0x30.0xffff) -# - -cafe babe # magic -ffff # minor_version -0030 # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count diff --git a/dx/tests/003-magic-version-access/class-version-49.0.txt b/dx/tests/003-magic-version-access/class-version-49.0.txt deleted file mode 100644 index 0b30fcdbe..000000000 --- a/dx/tests/003-magic-version-access/class-version-49.0.txt +++ /dev/null @@ -1,25 +0,0 @@ -# -# classfile with the highest valid version, 49.0 (0x31.0x00) -# - -cafe babe # magic -0000 # minor_version -0031 # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count diff --git a/dx/tests/003-magic-version-access/class-version-49.1.txt b/dx/tests/003-magic-version-access/class-version-49.1.txt deleted file mode 100644 index 9eb477c98..000000000 --- a/dx/tests/003-magic-version-access/class-version-49.1.txt +++ /dev/null @@ -1,26 +0,0 @@ -# -# classfile with a minor version 1 higher than the highest valid -# version. 49.1 (0x31.0x01) -# - -cafe babe # magic -0001 # minor_version -0031 # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count diff --git a/dx/tests/003-magic-version-access/class-version-49.65535.txt b/dx/tests/003-magic-version-access/class-version-49.65535.txt deleted file mode 100644 index 668631b34..000000000 --- a/dx/tests/003-magic-version-access/class-version-49.65535.txt +++ /dev/null @@ -1,26 +0,0 @@ -# -# classfile with an invalid version, with the same major version -# as the highest valid version. 49.65535 (0x31.0xffff) -# - -cafe babe # magic -ffff # minor_version -0031 # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count diff --git a/dx/tests/003-magic-version-access/class-version-50.0.txt b/dx/tests/003-magic-version-access/class-version-50.0.txt deleted file mode 100644 index fa670775a..000000000 --- a/dx/tests/003-magic-version-access/class-version-50.0.txt +++ /dev/null @@ -1,26 +0,0 @@ -# -# classfile with an invalid version, with a higher major version -# than the highest valid version. 50.0 (0x32.0x00) -# - -cafe babe # magic -0000 # minor_version -0032 # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count diff --git a/dx/tests/003-magic-version-access/class-version-50.1.txt b/dx/tests/003-magic-version-access/class-version-50.1.txt deleted file mode 100644 index 9543be144..000000000 --- a/dx/tests/003-magic-version-access/class-version-50.1.txt +++ /dev/null @@ -1,26 +0,0 @@ -# -# classfile with an invalid version, with a higher major version -# than the highest valid version. 50.0 (0x32.0x00) -# - -cafe babe # magic -0001 # minor_version -0032 # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count diff --git a/dx/tests/003-magic-version-access/class-version-50.65535.txt b/dx/tests/003-magic-version-access/class-version-50.65535.txt deleted file mode 100644 index 9db1958fc..000000000 --- a/dx/tests/003-magic-version-access/class-version-50.65535.txt +++ /dev/null @@ -1,26 +0,0 @@ -# -# classfile with an invalid version, with a higher major version -# than the highest valid version. 50.0 (0x32.0x00) -# - -cafe babe # magic -ffff # minor_version -0032 # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count diff --git a/dx/tests/003-magic-version-access/class-version-51.0.txt b/dx/tests/003-magic-version-access/class-version-51.0.txt deleted file mode 100644 index 2ffb4cd16..000000000 --- a/dx/tests/003-magic-version-access/class-version-51.0.txt +++ /dev/null @@ -1,26 +0,0 @@ -# -# classfile with an invalid version, with a higher major version -# than the highest valid version. 50.0 (0x32.0x00) -# - -cafe babe # magic -0000 # minor_version -0033 # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count diff --git a/dx/tests/003-magic-version-access/expected.txt b/dx/tests/003-magic-version-access/expected.txt deleted file mode 100644 index a63292224..000000000 --- a/dx/tests/003-magic-version-access/expected.txt +++ /dev/null @@ -1,243 +0,0 @@ -reading class-bad-magic.txt... -begin classfile -magic: deadbabe -minor_version: 0000 -major_version: 0031 - -trouble parsing: -bad class file magic (deadbabe) or version (0031.0000) -...while parsing class-bad-magic.txt -reading class-version-44.0.txt... -begin classfile -magic: cafebabe -minor_version: 0000 -major_version: 002c - -trouble parsing: -bad class file magic (cafebabe) or version (002c.0000) -...while parsing class-version-44.0.txt -reading class-version-44.65535.txt... -begin classfile -magic: cafebabe -minor_version: ffff -major_version: 002c - -trouble parsing: -bad class file magic (cafebabe) or version (002c.ffff) -...while parsing class-version-44.65535.txt -reading class-version-45.0.txt... -begin classfile -magic: cafebabe -minor_version: 0000 -major_version: 002d -constant_pool_count: 0005 - -constant_pool: - 0001: utf8{"Small"} - 0002: utf8{"java/lang/Object"} - 0003: type{Small} - 0004: type{java.lang.Object} -end constant_pool -access_flags: public|final|super|interface|abstract|synthetic|annotation|enum|89ce -this_class: type{Small} -super_class: type{java.lang.Object} -interfaces_count: 0000 -fields_count: 0000 -methods_count: 0000 -attributes_count: 0000 -end classfile -reading class-version-45.65535.txt... -begin classfile -magic: cafebabe -minor_version: ffff -major_version: 002d -constant_pool_count: 0005 - -constant_pool: - 0001: utf8{"Small"} - 0002: utf8{"java/lang/Object"} - 0003: type{Small} - 0004: type{java.lang.Object} -end constant_pool -access_flags: public|final|super|interface|abstract|synthetic|annotation|enum|89ce -this_class: type{Small} -super_class: type{java.lang.Object} -interfaces_count: 0000 -fields_count: 0000 -methods_count: 0000 -attributes_count: 0000 -end classfile -reading class-version-48.0.txt... -begin classfile -magic: cafebabe -minor_version: 0000 -major_version: 0030 -constant_pool_count: 0005 - -constant_pool: - 0001: utf8{"Small"} - 0002: utf8{"java/lang/Object"} - 0003: type{Small} - 0004: type{java.lang.Object} -end constant_pool -access_flags: public|final|super|interface|abstract|synthetic|annotation|enum|89ce -this_class: type{Small} -super_class: type{java.lang.Object} -interfaces_count: 0000 -fields_count: 0000 -methods_count: 0000 -attributes_count: 0000 -end classfile -reading class-version-48.65535.txt... -begin classfile -magic: cafebabe -minor_version: ffff -major_version: 0030 -constant_pool_count: 0005 - -constant_pool: - 0001: utf8{"Small"} - 0002: utf8{"java/lang/Object"} - 0003: type{Small} - 0004: type{java.lang.Object} -end constant_pool -access_flags: public|final|super|interface|abstract|synthetic|annotation|enum|89ce -this_class: type{Small} -super_class: type{java.lang.Object} -interfaces_count: 0000 -fields_count: 0000 -methods_count: 0000 -attributes_count: 0000 -end classfile -reading class-version-49.0.txt... -begin classfile -magic: cafebabe -minor_version: 0000 -major_version: 0031 -constant_pool_count: 0005 - -constant_pool: - 0001: utf8{"Small"} - 0002: utf8{"java/lang/Object"} - 0003: type{Small} - 0004: type{java.lang.Object} -end constant_pool -access_flags: public|final|super|interface|abstract|synthetic|annotation|enum|89ce -this_class: type{Small} -super_class: type{java.lang.Object} -interfaces_count: 0000 -fields_count: 0000 -methods_count: 0000 -attributes_count: 0000 -end classfile -reading class-version-49.1.txt... -begin classfile -magic: cafebabe -minor_version: 0001 -major_version: 0031 -constant_pool_count: 0005 - -constant_pool: - 0001: utf8{"Small"} - 0002: utf8{"java/lang/Object"} - 0003: type{Small} - 0004: type{java.lang.Object} -end constant_pool -access_flags: public|final|super|interface|abstract|synthetic|annotation|enum|89ce -this_class: type{Small} -super_class: type{java.lang.Object} -interfaces_count: 0000 -fields_count: 0000 -methods_count: 0000 -attributes_count: 0000 -end classfile -reading class-version-49.65535.txt... -begin classfile -magic: cafebabe -minor_version: ffff -major_version: 0031 -constant_pool_count: 0005 - -constant_pool: - 0001: utf8{"Small"} - 0002: utf8{"java/lang/Object"} - 0003: type{Small} - 0004: type{java.lang.Object} -end constant_pool -access_flags: public|final|super|interface|abstract|synthetic|annotation|enum|89ce -this_class: type{Small} -super_class: type{java.lang.Object} -interfaces_count: 0000 -fields_count: 0000 -methods_count: 0000 -attributes_count: 0000 -end classfile -reading class-version-50.0.txt... -begin classfile -magic: cafebabe -minor_version: 0000 -major_version: 0032 -constant_pool_count: 0005 - -constant_pool: - 0001: utf8{"Small"} - 0002: utf8{"java/lang/Object"} - 0003: type{Small} - 0004: type{java.lang.Object} -end constant_pool -access_flags: public|final|super|interface|abstract|synthetic|annotation|enum|89ce -this_class: type{Small} -super_class: type{java.lang.Object} -interfaces_count: 0000 -fields_count: 0000 -methods_count: 0000 -attributes_count: 0000 -end classfile -reading class-version-50.1.txt... -begin classfile -magic: cafebabe -minor_version: 0001 -major_version: 0032 - -trouble parsing: -bad class file magic (cafebabe) or version (0032.0001) -...while parsing class-version-50.1.txt -reading class-version-50.65535.txt... -begin classfile -magic: cafebabe -minor_version: ffff -major_version: 0032 - -trouble parsing: -bad class file magic (cafebabe) or version (0032.ffff) -...while parsing class-version-50.65535.txt -reading class-version-51.0.txt... -begin classfile -magic: cafebabe -minor_version: 0000 -major_version: 0033 - -trouble parsing: -bad class file magic (cafebabe) or version (0033.0000) -...while parsing class-version-51.0.txt -reading small-class.txt... -begin classfile -magic: cafebabe -minor_version: 0000 -major_version: 0031 -constant_pool_count: 0005 - -constant_pool: - 0001: utf8{"Small"} - 0002: utf8{"java/lang/Object"} - 0003: type{Small} - 0004: type{java.lang.Object} -end constant_pool -access_flags: public|final|super|interface|abstract|synthetic|annotation|enum|89ce -this_class: type{Small} -super_class: type{java.lang.Object} -interfaces_count: 0000 -fields_count: 0000 -methods_count: 0000 -attributes_count: 0000 -end classfile diff --git a/dx/tests/003-magic-version-access/info.txt b/dx/tests/003-magic-version-access/info.txt deleted file mode 100644 index 4d6a697c1..000000000 --- a/dx/tests/003-magic-version-access/info.txt +++ /dev/null @@ -1,9 +0,0 @@ -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 bits of parsing tested here are: - -* magic number -* major / minor version numbers -* class access_flags diff --git a/dx/tests/003-magic-version-access/run b/dx/tests/003-magic-version-access/run deleted file mode 100644 index 24de48e8e..000000000 --- a/dx/tests/003-magic-version-access/run +++ /dev/null @@ -1,46 +0,0 @@ -#!/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. - -# The tests that don't specify "--debug" are expected to -# throw exceptions. If --debug is on we'll get a stack -# trace, which is unpredictable and doesn't work well with -# expected.txt vs. out.txt comparisons. - -# Bad magic (throws an expection) -dx --dump --strict class-bad-magic.txt - -# Too small (throws an exception) -dx --dump --strict class-version-44.0.txt -dx --dump --strict class-version-44.65535.txt - -# Just right -dx --debug --dump --width=100 class-version-45.0.txt -dx --debug --dump --width=100 class-version-45.65535.txt -dx --debug --dump --width=100 class-version-48.0.txt -dx --debug --dump --width=100 class-version-48.65535.txt -dx --debug --dump --width=100 class-version-49.0.txt -dx --debug --dump --width=100 class-version-49.1.txt -dx --debug --dump --width=100 class-version-49.65535.txt -dx --debug --dump --width=100 class-version-50.0.txt - -# Too big (throws an exception) -dx --dump --strict class-version-50.1.txt -dx --dump --strict class-version-50.65535.txt -dx --dump --strict class-version-51.0.txt - -# Show that we can dump the access flags even when they -# don't make any sense. -dx --debug --dump --width=100 small-class.txt diff --git a/dx/tests/003-magic-version-access/small-class.txt b/dx/tests/003-magic-version-access/small-class.txt deleted file mode 100644 index 3eb7402e9..000000000 --- a/dx/tests/003-magic-version-access/small-class.txt +++ /dev/null @@ -1,25 +0,0 @@ -# -# sample small-but-valid classfile -# - -cafe babe # magic -0000 # minor_version -0031 # major_version -0005 # 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] - -ffff # access_flags -0003 # this_class -0004 # super_class -0000 # interfaces_count -0000 # fields_count -0000 # methods_count - -0000 # attributes_count |