<commit_before>
/*******************************************************************************
 * Copyright (c) 2004, 2005 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/
package org.eclipse.birt.report.engine.api;

import java.io.File;
import java.util.HashMap;
import java.util.Iterator;

import org.eclipse.birt.report.engine.EngineCase;
import org.eclipse.birt.report.engine.api.impl.ScalarParameterDefn;

/**
 * 
 */

public class ReportEngineTest extends EngineCase
{
	protected HashMap supportedMap = null;
	
	static final String REPORT_DESIGN_RESOURCE = "org/eclipse/birt/report/engine/api/ReportEngineTest.rptdesign";
	static final String REPORT_DESIGN = "ReportEngineTest.rptdesign";
	
	public void setUp( )
	{
		removeFile( REPORT_DESIGN );
		copyResource( REPORT_DESIGN_RESOURCE, REPORT_DESIGN );
		
		initSupportedMap( );
	}
	
	public void tearDown( )
	{
		removeFile( REPORT_DESIGN );
	}
	
	/**
	 * API test on IReportEngine.getConfig( ) method
	 */
	public void testGetConfig( )
	{
		EngineConfig config = new EngineConfig( );
		config.setTempDir( "tempdir" );
		ReportEngine engine = new ReportEngine( config );
		EngineConfig configGet = engine.getConfig( );
		assertEquals( config.getTempDir( ), configGet.getTempDir( ) );
		engine.shutdown( );
	}
	
	/**
	 * API test on IReportEngine.openReportDesign( ) method
	 */
	public void testOpenReportDesign( )
	{
		try
		{
			String rootPath = (new File("")).getAbsolutePath( ).replace( '\\','/' );
			String goldenReportName = "file:/" + rootPath + "/" + REPORT_DESIGN;
			<commit_msg>fix testcase failure<commit_after>
/*******************************************************************************
 * Copyright (c) 2004, 2005 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/
package org.eclipse.birt.report.engine.api;

import java.io.File;
import java.util.HashMap;
import java.util.Iterator;

import org.eclipse.birt.report.engine.EngineCase;
import org.eclipse.birt.report.engine.api.impl.ScalarParameterDefn;

/**
 * 
 */

public class ReportEngineTest extends EngineCase
{
	protected HashMap supportedMap = null;
	
	static final String REPORT_DESIGN_RESOURCE = "org/eclipse/birt/report/engine/api/ReportEngineTest.rptdesign";
	static final String REPORT_DESIGN = "ReportEngineTest.rptdesign";
	
	public void setUp( )
	{
		removeFile( REPORT_DESIGN );
		copyResource( REPORT_DESIGN_RESOURCE, REPORT_DESIGN );
		
		initSupportedMap( );
	}
	
	public void tearDown( )
	{
		removeFile( REPORT_DESIGN );
	}
	
	/**
	 * API test on IReportEngine.getConfig( ) method
	 */
	public void testGetConfig( )
	{
		EngineConfig config = new EngineConfig( );
		config.setTempDir( "tempdir" );
		ReportEngine engine = new ReportEngine( config );
		EngineConfig configGet = engine.getConfig( );
		assertEquals( config.getTempDir( ), configGet.getTempDir( ) );
		engine.shutdown( );
	}
	
	/**
	 * API test on IReportEngine.openReportDesign( ) method
	 */
	public void testOpenReportDesign( )
	{
		try
		{
			String rootPath = new File("").toURL( ).toString( );
			String goldenReportName = rootPath + "/" + REPORT_DESIGN;
			
{'fraction_non_alphanumeric': 0.18231611893583724, 'fraction_numerical': 0.006259780907668232, 'mean_word_length': 4.541907514450867, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '425384', 'n_tokens_mistral': 1196, 'n_tokens_neox': 1088, 'n_words': 269}