use of org.apache.sysml.test.integration.TestConfiguration in project incubator-systemml by apache.
the class ParForSampleTest method setUp.
@Override
public void setUp() {
TestUtils.clearAssertionInformation();
addTestConfiguration(TEST_NAME, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME, new String[] { "B1", "B2" }));
}
use of org.apache.sysml.test.integration.TestConfiguration in project incubator-systemml by apache.
the class ColStdDevsTest method setUp.
@Override
public void setUp() {
TestUtils.clearAssertionInformation();
TestConfiguration config = new TestConfiguration(TEST_CLASS_DIR, TEST_NAME);
addTestConfiguration(TEST_NAME, config);
}
use of org.apache.sysml.test.integration.TestConfiguration in project incubator-systemml by apache.
the class ColSumTest method testGeneral.
@Test
public void testGeneral() {
int rows = 10;
int cols = 10;
TestConfiguration config = getTestConfiguration(TEST_GENERAL);
config.addVariable("rows", rows);
config.addVariable("cols", cols);
loadTestConfiguration(config);
double[][] vector = getRandomMatrix(rows, 1, 0, 1, 1, -1);
double[][] vectorColSum = new double[1][1];
for (int i = 0; i < rows; i++) {
vectorColSum[0][0] += vector[i][0];
}
writeInputMatrix("vector", vector);
writeExpectedMatrix("vector_colsum", vectorColSum);
double[][] matrix = getRandomMatrix(rows, cols, 0, 1, 1, -1);
double[][] matrixColSum = new double[1][cols];
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
matrixColSum[0][j] += matrix[i][j];
}
}
writeInputMatrix("matrix", matrix);
writeExpectedMatrix("matrix_colsum", matrixColSum);
runTest();
compareResults(1e-14);
}
use of org.apache.sysml.test.integration.TestConfiguration in project incubator-systemml by apache.
the class ColSumTest method setUp.
@Override
public void setUp() {
// positive tests
addTestConfiguration(TEST_GENERAL, new TestConfiguration(TEST_CLASS_DIR, "ColSumTest", new String[] { "vector_colsum", "matrix_colsum" }));
// negative tests
addTestConfiguration(TEST_SCALAR, new TestConfiguration(TEST_CLASS_DIR, "ColSumScalarTest", new String[] { "computed" }));
}
use of org.apache.sysml.test.integration.TestConfiguration in project incubator-systemml by apache.
the class ColSumTest method testScalar.
@Test
public void testScalar() {
int scalar = 12;
TestConfiguration config = getTestConfiguration(TEST_SCALAR);
config.addVariable("scalar", scalar);
createHelperMatrix();
loadTestConfiguration(config);
runTest(true, DMLException.class);
}
Aggregations