예제 #1
0
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());
}
예제 #2
0
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);
}
예제 #3
0
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());
}
예제 #4
0
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());
}
예제 #5
0
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());
}
예제 #6
0
    virtual void getSourceConfig(int source, Config &config) {
        memset(&config, 0, sizeof(config));

        getTestData(sources[source].c_str(), config);
        config.createSourceA =
            config.createSourceB = createSource;
    }
예제 #7
0
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();
}
예제 #8
0
void doCommand(struct AppFrame* pInFrame)
{
	struct AppFrame* pOutFrame;
	switch(pInFrame->port)
	{
		case TESTPORT:
		{
			pOutFrame = getTestData(pInFrame);
			sendData(pOutFrame);
		}
	}
}
예제 #9
0
파일: indenttest.cpp 프로젝트: hlamer/kate
void IndentTest::testPascal_data()
{
  getTestData( "pascal" );
}
예제 #10
0
파일: indenttest.cpp 프로젝트: hlamer/kate
void IndentTest::latex_data()
{
  getTestData( "latex" );
}
예제 #11
0
파일: indenttest.cpp 프로젝트: hlamer/kate
void IndentTest::testHaskell_data()
{
  getTestData( "haskell" );
}
예제 #12
0
파일: indenttest.cpp 프로젝트: hlamer/kate
void IndentTest::testPython_data()
{
    getTestData( "python" );
}
예제 #13
0
파일: indenttest.cpp 프로젝트: hlamer/kate
void IndentTest::testCMake_data()
{
    getTestData( "cmake" );
}
예제 #14
0
파일: indenttest.cpp 프로젝트: hlamer/kate
void IndentTest::testNormal_data()
{
  getTestData( "normal" );
}
예제 #15
0
파일: indenttest.cpp 프로젝트: hlamer/kate
void IndentTest::testRuby_data()
{
  getTestData( "ruby" );
}
예제 #16
0
void IndentTest::testAda_data()
{
  getTestData("ada");
}
예제 #17
0
파일: indenttest.cpp 프로젝트: hlamer/kate
void IndentTest::testXml_data()
{
  getTestData( "xml" );
}
예제 #18
0
void IndentTest::testReplicode_data()
{
    getTestData("replicode");
}
예제 #19
0
파일: indenttest.cpp 프로젝트: hlamer/kate
void IndentTest::testCstyle_data()
{
  getTestData( "cstyle" );
}
예제 #20
0
void CommandsTest::utils_data()
{
  getTestData("utils");
}