void JavaStringArrayTest::createNewJavaStringArrayWithDataCopy(JNIEnv *env, jobject javaThis) { JavaString **data = getTestData(); JavaStringArray JavaStringArray(data, getTestDataSize(), true); free(data); JavaString **expected = getTestData(); JUNIT_ASSERT_EQUALS_INT(getTestDataSize(), JavaStringArray.size()); JUNIT_ASSERT_EQUALS_JAVA_STRING_ARRAY(expected, JavaStringArray.get(), JavaStringArray.size()); }
void JavaStringArrayTest::setDataWithCopy(JNIEnv *env, jobject javaThis) { JavaString **data = getTestData(); JavaStringArray JavaStringArray; JavaStringArray.set(data, getTestDataSize(), true); // Write 0's over the original data to make sure that a false positive // doesn't cause the test to pass. memset(data, 0, getTestDataSize()); JavaString **expected = getTestData(); JUNIT_ASSERT_EQUALS_INT(getTestDataSize(), JavaStringArray.size()); JUNIT_ASSERT_EQUALS_JAVA_STRING_ARRAY(expected, JavaStringArray.get(), JavaStringArray.size()); free(expected); }
void JavaStringArrayTest::nativeCreateNewJavaStringArrayWithJavaData(JNIEnv *env, jobject javaThis, jobjectArray javaData) { JavaString **data = getTestData(); JavaStringArray JavaStringArray(env, javaData); JUNIT_ASSERT_EQUALS_INT(getTestDataSize(), JavaStringArray.size()); JUNIT_ASSERT_NOT_NULL(JavaStringArray.get()); JUNIT_ASSERT_EQUALS_JAVA_STRING_ARRAY(data, JavaStringArray.get(), JavaStringArray.size()); }
void JavaStringArrayTest::nativeSetJavaStringArray(JNIEnv *env, jobject javaThis, jobjectArray javaData, jint expectedSize) { JavaString **data = getTestData(); JavaStringArray JavaStringArray; JavaStringArray.set(env, javaData); JUNIT_ASSERT_EQUALS_INT(expectedSize, JavaStringArray.size()); JUNIT_ASSERT_EQUALS_JAVA_STRING_ARRAY(data, JavaStringArray.get(), JavaStringArray.size()); }
void JavaStringArrayTest::setData(JNIEnv *env, jobject javaThis) { JavaString **data = getTestData(); JavaStringArray JavaStringArray; JavaStringArray.set(data, getTestDataSize(), false); JUNIT_ASSERT_EQUALS_INT(getTestDataSize(), JavaStringArray.size()); JUNIT_ASSERT_EQUALS_JAVA_STRING_ARRAY(data, JavaStringArray.get(), JavaStringArray.size()); }
virtual void getSourceConfig(int source, Config &config) { memset(&config, 0, sizeof(config)); getTestData(sources[source].c_str(), config); config.createSourceA = config.createSourceB = createSource; }
jobjectArray JavaStringArrayTest::nativeGetTestJavaStringArray(JNIEnv *env, jobject javaThis) { JavaString **data = getTestData(); JavaStringArray JavaStringArray(data, getTestDataSize(), true); JUNIT_ASSERT_EQUALS_INT(getTestDataSize(), JavaStringArray.size()); JUNIT_ASSERT_EQUALS_JAVA_STRING_ARRAY(data, JavaStringArray.get(), JavaStringArray.size()); JniLocalRef<jobjectArray> result = JavaStringArray.toJavaStringArray(env); return result.leak(); }
void doCommand(struct AppFrame* pInFrame) { struct AppFrame* pOutFrame; switch(pInFrame->port) { case TESTPORT: { pOutFrame = getTestData(pInFrame); sendData(pOutFrame); } } }
void IndentTest::testPascal_data() { getTestData( "pascal" ); }
void IndentTest::latex_data() { getTestData( "latex" ); }
void IndentTest::testHaskell_data() { getTestData( "haskell" ); }
void IndentTest::testPython_data() { getTestData( "python" ); }
void IndentTest::testCMake_data() { getTestData( "cmake" ); }
void IndentTest::testNormal_data() { getTestData( "normal" ); }
void IndentTest::testRuby_data() { getTestData( "ruby" ); }
void IndentTest::testAda_data() { getTestData("ada"); }
void IndentTest::testXml_data() { getTestData( "xml" ); }
void IndentTest::testReplicode_data() { getTestData("replicode"); }
void IndentTest::testCstyle_data() { getTestData( "cstyle" ); }
void CommandsTest::utils_data() { getTestData("utils"); }