Skip to content

Conversation

@copybara-service
Copy link

Added JUnit Test Cases for Replacement

Changes

This PR adds the missing unit test case for Replacement.

Before:
Screenshot 2025-07-16 at 10 26 05 PM

After:
Screenshot 2025-07-16 at 10 24 41 PM

Test Plan

mvn -Dtest=ReplacementTest test

...
[INFO] Running com.google.googlejavaformat.java.ReplacementTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.068 s - in com.google.googlejavaformat.java.ReplacementTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

mvn test

[INFO] Results:
[INFO] 
[INFO] Tests run: 1533, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  12.168 s
[INFO] Finished at: 2025-07-16T22:30:47-07:00
[INFO] ------------------------------------------------------------------------

Next Steps

  • Add more missing test cases to make this codebase more resilient.

Fixes #1268

FUTURE_COPYBARA_INTEGRATE_REVIEW=#1268 from surajdm123:add-test 1bad87c

### Changes

This PR adds the missing unit test case for Replacement.

**Before:**
<img width="938" height="315" alt="Screenshot 2025-07-16 at 10 26 05 PM" src="https://github.com/user-attachments/assets/47a08af5-b240-40ba-8abf-9f20dce46c22" />

**After:**
<img width="947" height="315" alt="Screenshot 2025-07-16 at 10 24 41 PM" src="https://github.com/user-attachments/assets/2a18ffca-0b75-4e18-b071-7246c438ce29" />

### Test Plan

> mvn -Dtest=ReplacementTest test

```
...
[INFO] Running com.google.googlejavaformat.java.ReplacementTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.068 s - in com.google.googlejavaformat.java.ReplacementTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
```
----

> mvn test

```
[INFO] Results:
[INFO]
[INFO] Tests run: 1533, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  12.168 s
[INFO] Finished at: 2025-07-16T22:30:47-07:00
[INFO] ------------------------------------------------------------------------

```

### Next Steps

- Add more missing test cases to make this codebase more resilient.

Fixes #1268

COPYBARA_INTEGRATE_REVIEW=#1268 from surajdm123:add-test 1bad87c
PiperOrigin-RevId: 784313467
@copybara-service copybara-service bot merged commit bc9a578 into master Jul 17, 2025
@copybara-service copybara-service bot deleted the test_784305506 branch July 17, 2025 21:18
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