package forall;

import static org.junit.Assert.assertTrue;

import java.io.File;
import java.io.FileNotFoundException;

import org.junit.BeforeClass;
import org.junit.Test;

import config.Example;
import edu.udel.cis.vsl.tass.config.VerifyConfiguration;
import edu.udel.cis.vsl.tass.front.minimp.ModelExtractor;
import edu.udel.cis.vsl.tass.model.IF.ModelIF;
import edu.udel.cis.vsl.tass.verify.Verification;

public class ForAllTest {
	private static ModelIF model;
	private static VerifyConfiguration configuration;

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		File rootDirectory = new File(Example.exampleDirectory, "forall");

		configuration = new VerifyConfiguration(new File(rootDirectory,
				"TASSREP"));
		configuration.setSourceFile(new File(rootDirectory, "forall.c"));
		configuration.setInput("N_BOUND", 1);
		configuration.setNumProcs(1);
		configuration.setModelName("forall_1");
		model = ModelExtractor.extractModel(configuration);
	}

	@Test
	public void testVerifySpec() throws FileNotFoundException {
		assertTrue(Verification.verify(model, configuration, true));
	}

}
