package simpleMP;

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;

/** This test known to fail since presently send-recv is implemented by
 * doing send first, then receive. */
public class SendRecvTestSkip {
	private static ModelIF model;
	private static VerifyConfiguration configuration;

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

		configuration = new VerifyConfiguration(new File(rootDirectory,
				"TASSREP"));
		configuration.setSourceFile(new File(rootDirectory, "sendRecv.c"));
		configuration.setModelName("sendRecv");
		configuration.setNumProcs(2);
		model = ModelExtractor.extractModel(configuration);
	}

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