Convert dom.serialize.TestNS to JUnit - #107
Open
elharo wants to merge 4 commits into
Open
Conversation
elharo
force-pushed
the
convert-testns-to-junit
branch
from
July 7, 2026 22:03
400a9d9 to
4f728f0
Compare
There was a problem hiding this comment.
Pull request overview
Converts the legacy dom.serialize.TestNS namespace-serialization harness from a main()-driven utility into an Ant-executed JUnit 3 test case, so it runs as part of the regular test suite.
Changes:
- Replaced command-line parsing + file-based I/O with an in-memory DOM construction and JUnit 3
TestCaseassertions. - Added
TestNSto the Antbatchtestfileset so it runs inbuild.xml-driven test runs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/dom/serialize/TestNS.java | Rewritten into a JUnit 3 TestCase that builds a DOM, serializes it, and asserts expected namespace-related output. |
| build.xml | Registers dom/serialize/TestNS.class in the JUnit batchtest includes so the new test executes in CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
elharo
marked this pull request as draft
July 8, 2026 15:00
elharo
force-pushed
the
convert-testns-to-junit
branch
from
July 16, 2026 14:40
8ef4dc4 to
f6b874a
Compare
…alization test The assertion checking for 'xx:attr' in serialized output is incorrect. When xx is already bound to 'foo' via an xmlns:xx declaration on the same element, an attribute with prefix xx in namespace http://rsa2 creates a prefix collision. The serializer's namespace-fixup algorithm correctly assigns a new prefix (e.g. NS1:attr). Replace the assertion with one that checks for the namespace URI instead.
elharo
marked this pull request as ready for review
July 16, 2026 15:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Convert the dom.serialize.TestNS test harness from main()-driven to JUnit 3.