Bug 176674 Errors/Failures found in JUnit test of org.eclipse.birt.report.engine.emitter.html.tests
Errors/Failures found in JUnit test of org.eclipse.birt.report.engine.emitter.html.tests in daily build 20070308. The build runs from HEAD version. Please see the attachment for details.
engine/org.eclipse.birt.report.engine.emitter.html.tests/test/org/eclipse/birt/report/engine/emitter/html/MetadataEmitterTest.java
private void assertMetadataNotOutput( String content, List instanceIds,
			String bookmark, String type )
	{
		assertEquals( 0, getCount( instanceIds, bookmark, type, null ) );
		assertTrue( metadataNotOutputInHtml( content, bookmark, type) );
	}
	
	private boolean metaDataOutputInHtml( String content, String bookmark, String type)
	{
		String resultPattern = getMetaDataPattern( bookmark, type );
		Pattern pattern = Pattern.compile( resultPattern );
		Matcher matcher = pattern.matcher( content );
		boolean result = false;
		if ( matcher.find( ) )
		{
			String attributes = matcher.group( 1 );
			String elementType = " element_type=\"" + type + "\"";
			if ( attributes.indexOf( elementType ) >= 0 )
			{
				result = true;
			}
		}
		assertFalse( matcher.find( ) );
		return result;
	}
	private boolean metadataNotOutputInHtml( String content, String bookmark, String type)
	{
		Pattern metadataPattern = Pattern.compile( getMetaDataPattern(
				bookmark, type ) );
		assertFalse( metadataPattern.matcher( content ).matches( ) );