2015-06-14 07:04:57 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2010-2015 SAP SE.
|
2016-08-28 00:24:24 +00:00
|
|
|
* 2016 The University of Sheffield.
|
2015-06-14 07:04:57 +00:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2016-08-21 22:01:28 +00:00
|
|
|
package eu.aniketos.dasca.dataflow.test;
|
2015-06-14 07:04:57 +00:00
|
|
|
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
|
|
2016-08-23 12:46:28 +00:00
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
import org.eclipse.core.runtime.CoreException;
|
2016-08-28 14:51:55 +00:00
|
|
|
import org.junit.Before;
|
2015-06-14 07:04:57 +00:00
|
|
|
import org.junit.Test;
|
|
|
|
|
2016-08-23 12:46:28 +00:00
|
|
|
import com.ibm.wala.util.CancelException;
|
|
|
|
|
2015-06-14 07:04:57 +00:00
|
|
|
import eu.aniketos.dasca.dataflow.util.SuperGraphUtil;
|
|
|
|
|
|
|
|
public class Test02 {
|
|
|
|
|
|
|
|
String entryClass = "Test02";
|
2016-08-28 14:51:55 +00:00
|
|
|
|
|
|
|
@Before
|
|
|
|
public void initTest() throws IllegalArgumentException, CancelException, IOException{
|
|
|
|
TestSuite.initTestSG(entryClass);
|
|
|
|
}
|
|
|
|
|
2015-06-14 07:04:57 +00:00
|
|
|
@Test
|
2016-08-23 12:46:28 +00:00
|
|
|
public void testBad() throws IllegalArgumentException, CancelException, IOException, CoreException {
|
2016-08-28 14:51:55 +00:00
|
|
|
int result = SuperGraphUtil.analyzeAndSaveSuperGraph(TestSuite.superGraph, entryClass, "bad");
|
2015-06-14 07:04:57 +00:00
|
|
|
assertEquals(1, result);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
2016-08-23 12:46:28 +00:00
|
|
|
public void testGood01() throws IllegalArgumentException, CancelException, IOException, CoreException {
|
2016-08-28 14:51:55 +00:00
|
|
|
int result = SuperGraphUtil.analyzeAndSaveSuperGraph(TestSuite.superGraph, entryClass, "good01");
|
2015-06-14 07:04:57 +00:00
|
|
|
assertEquals(0, result);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
2016-08-23 12:46:28 +00:00
|
|
|
public void testGood02() throws IllegalArgumentException, CancelException, IOException, CoreException {
|
2016-08-28 14:51:55 +00:00
|
|
|
int result = SuperGraphUtil.analyzeAndSaveSuperGraph(TestSuite.superGraph, entryClass, "good02");
|
2015-06-14 07:04:57 +00:00
|
|
|
assertEquals(0, result);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|