public static void assertExpectedComposite(Object test, String expectedDump, DataType composite,
			boolean recursive) {
		assertTrue(composite instanceof Composite);
		String result = dump(composite, recursive).trim();
		expectedDump = expectedDump.trim();
		int len = expectedDump.length();
		int expectedLine = 1;
		int expectedCol = 0;
		int index = 0;
		boolean mismatch = false;

		for (index = 0; index < len; index++) {
			++expectedCol;
			char expectedChar = expectedDump.charAt(index);
			if (expectedChar == '\n') {
				++expectedLine;
				expectedCol = 0; // newline
			}
			char resultChar = (index < result.length()) ? result.charAt(index) : 0;
			if (resultChar != expectedChar) {
				Msg.error(test, "Expected and result differ: expected line " + expectedLine +
					", column " + expectedCol);
				mismatch = true;
				break;
			}
		}

		mismatch |= len != result.length();

		if (mismatch) {
			Msg.error(test, "Expected composite:\n" + expectedDump);
			Msg.error(test, "Result composite:\n" + result);
			fail("Failed to parse expected composite (see log)");
		}
	}
Compare dump of composite with the expected on
@param test JUnit test instance used for reporting
@param expectedDump expected composite dump
@param composite test result composite
@param recursive if true all child composites will be included in dump
Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/program/model/data/CompositeTestUtils.java