Skip to content

test: add test coverage for cached enum.getId() pattern#11

Merged
johnsonlee merged 1 commit intomainfrom
test/cached-enum-id-pattern
Jan 29, 2026
Merged

test: add test coverage for cached enum.getId() pattern#11
johnsonlee merged 1 commit intomainfrom
test/cached-enum-id-pattern

Conversation

@johnsonlee
Copy link
Owner

Summary

  • Add test fixtures for static final Integer CACHED_ID = AbKey.SAMPLE_ID.getId() pattern
  • Add test case verifying backward slice traces through cached enum ID fields
  • Confirms this common AB testing pattern is already supported

Test plan

  • StaticFieldIndirectReferenceTest passes with new test case
  • All 74 tests in graphite-sootup pass

🤖 Generated with Claude Code

Add test cases to verify that the analysis can trace through the pattern:
  static final Integer CACHED_ID = AbKey.SAMPLE_ID.getId();
  abClient.getOption(CACHED_ID);

The backward slice correctly traces through the static field to find
the enum constants and their values.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@johnsonlee johnsonlee merged commit 7f1c956 into main Jan 29, 2026
1 check passed
@johnsonlee johnsonlee deleted the test/cached-enum-id-pattern branch January 29, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant