• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1This is a smoke test of dex conversion, which checks to see that uses
2of a known-null in contexts that require a specific type end up getting
3converted to the type in question. When executed, this sort of code
4will inevitably throw a NullPointerException, but if the opcode weren't
5correct, they would instead incorrectly fail verification.
6
7If you inspect the expected output of this test, you will see that
8there are some surprising instructions in there, such as using
9aget-byte for what was a boolean[] in the source code. In these cases,
10the resulting output is still correct (passes verification and will
11throw a NullPointerException if ever executed). However, it happens
12that during translation there simply wasn't enough information to
13recover the "true" original meaning at the level of actual opcode
14selection.
15
16This test compares emitted code against a known-good (via eyeballing)
17version, so it is possible for this test to spuriously fail if other
18aspects of conversion end up altering the output in innocuous ways.
19