Esempio n. 1
0
void JavaClassUtilsTest::makeNameForSignatureWithObject(JNIEnv *env, jobject javaThis) {
  std::string result;
  TestObject testObject;
  JavaClassUtils::makeNameForSignature(result, testObject.getCanonicalName());
  std::stringstream expected;
  expected << "L" << testObject.getCanonicalName() << ";";
  JUNIT_ASSERT_EQUALS_STRING(expected.str().c_str(), result);
}
Esempio n. 2
0
void JavaClassUtilsTest::makeNameForSignatureWithArrayOfObjects(JNIEnv *env, jobject javaThis) {
  std::string result;
  TestObject testObject;
  JavaClassUtils::makeNameForSignature(result, kTypeObjectArray(MAKE_CANONICAL_NAME(PACKAGE, TestObject)));
  std::stringstream expected;
  expected << "[L" << testObject.getCanonicalName() << ";";
  JUNIT_ASSERT_EQUALS_STRING(expected.str().c_str(), result);
}