Commit graph

3 commits

Author SHA1 Message Date
Mohamed Ashraf
8d42ed93dd test(05-02): add concurrency-aware assertion removal tests
- 14 new tests in TestConcurrencyPatterns class
- synchronized blocks/methods preserved after transformation
- volatile field reads, AtomicInteger ops preserved
- ConcurrentHashMap, Thread.sleep, wait/notify patterns preserved
- ReentrantLock, CountDownLatch patterns preserved
- Real-world TokenBucket and CircularBuffer patterns validated
- AssertJ assertion on synchronized method call validated
- Total: 71 tests (57 existing + 14 new), all passing
2026-02-06 13:27:41 +00:00
misrasaurabh1
0ff54b5043 better unit test discovery java 2026-02-05 23:57:13 -08:00
Saurabh Misra
31c90f0391 feat: implement Java assertion removal transformer
Add a robust Java assert removal transformer to convert generated unit
tests into regression tests. This removes assertion statements while
preserving function calls, enabling behavioral verification by comparing
outputs between original and optimized code.

Key features:
- Support for JUnit 5 assertions (assertEquals, assertTrue, assertThrows, etc.)
- Support for JUnit 4 assertions (org.junit.Assert.*)
- Support for AssertJ fluent assertions (assertThat().isEqualTo())
- Support for TestNG and Hamcrest assertions
- Framework auto-detection from imports
- Handles assertAll grouped assertions
- Preserves non-assertion code (setup, Mockito mocks, etc.)
- 57 comprehensive tests with exact string equality assertions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 09:02:25 +00:00