Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • asm asm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • asmasm
  • asmasm
  • Merge requests
  • !8

Add a ClassDump utility to compare Java classes in unit tests.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Eric Bruneton requested to merge add-class-dump-tool-for-unit-tests into master Sep 16, 2017
  • Overview 32
  • Commits 6
  • Pipelines 0
  • Changes 1

Currently the conformance tests use ASM to make assertions about itself (via the ClassReader and TraceClassVisitor classes, used to compare classes before and after some transformation). This circular dependency makes some bugs impossible to detect (for instance, bugs where ClassReader silently ignores some parts of a class).

This new class will be used to replace ClassReader+TraceClassVisitor as a mean of comparing classes at a slightly higher level than bytes (to abstract away non-essential differences such as the order of the elements in the constant pool, in attributes, etc). This new class is much simpler than ClassReader and much closer to the Java Virtual Machine Specification, in order to get a high confidence in its correctness (which is important since it will serve as a basis to check the correctness of ASM).

Unit tests for this new class will be added in later commits (this one is already quite large). Likewise, the existing ASM tests will be converted to use this new class in later commits. I tried to use long, explicit and meaningful names, with extensive comments, but please make comments if some things are not clear or are missing.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: add-class-dump-tool-for-unit-tests