Skip to content

Commit

Permalink
Add multi-word parameter name to test suite
Browse files Browse the repository at this point in the history
And reference it from the docstring.
  • Loading branch information
louiswins committed Jan 31, 2018
1 parent 961181a commit 785a226
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
6 changes: 4 additions & 2 deletions test-suite/djinni/test.djinni
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
test_helpers = interface +c {
# Method with documentation
static get_set_record(): set_record;
# Method with long documentation
# Method with long documentation & doxygen
# (Second line of multi-line documentation.
# Indented third line of multi-line documentation.)
static check_set_record(rec: set_record): bool;
# @param the_record the record to check
# @return whether the record is okay
static check_set_record(the_record: set_record): bool;

static get_primitive_list(): primitive_list;
static check_primitive_list(pl: primitive_list): bool;
Expand Down
6 changes: 4 additions & 2 deletions test-suite/generated-src/cpp/test_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ class TestHelpers {
static SetRecord get_set_record();

/**
* Method with long documentation
* Method with long documentation & doxygen
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
* @param the_record the record to check
* @return whether the record is okay
*/
static bool check_set_record(const SetRecord & rec);
static bool check_set_record(const SetRecord & the_record);

static PrimitiveList get_primitive_list();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ public abstract class TestHelpers {
public static native SetRecord getSetRecord();

/**
* Method with long documentation
* Method with long documentation & doxygen
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
* @param theRecord the record to check
* @return whether the record is okay
*/
public static native boolean checkSetRecord(@Nonnull SetRecord rec);
public static native boolean checkSetRecord(@Nonnull SetRecord theRecord);

@Nonnull
public static native PrimitiveList getPrimitiveList();
Expand Down
4 changes: 2 additions & 2 deletions test-suite/generated-src/jni/NativeTestHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ CJNIEXPORT jobject JNICALL Java_com_dropbox_djinni_test_TestHelpers_getSetRecord
} JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}

CJNIEXPORT jboolean JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkSetRecord(JNIEnv* jniEnv, jobject /*this*/, jobject j_rec)
CJNIEXPORT jboolean JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkSetRecord(JNIEnv* jniEnv, jobject /*this*/, jobject j_theRecord)
{
try {
DJINNI_FUNCTION_PROLOGUE0(jniEnv);
auto r = ::testsuite::TestHelpers::check_set_record(::djinni_generated::NativeSetRecord::toCpp(jniEnv, j_rec));
auto r = ::testsuite::TestHelpers::check_set_record(::djinni_generated::NativeSetRecord::toCpp(jniEnv, j_theRecord));
return ::djinni::release(::djinni::Bool::fromCpp(jniEnv, r));
} JNI_TRANSLATE_EXCEPTIONS_RETURN(jniEnv, 0 /* value doesn't matter */)
}
Expand Down
4 changes: 2 additions & 2 deletions test-suite/generated-src/objc/DBTestHelpers+Private.mm
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ + (nonnull DBSetRecord *)getSetRecord {
} DJINNI_TRANSLATE_EXCEPTIONS()
}

+ (BOOL)checkSetRecord:(nonnull DBSetRecord *)rec {
+ (BOOL)checkSetRecord:(nonnull DBSetRecord *)theRecord {
try {
auto objcpp_result_ = ::testsuite::TestHelpers::check_set_record(::djinni_generated::SetRecord::toCpp(rec));
auto objcpp_result_ = ::testsuite::TestHelpers::check_set_record(::djinni_generated::SetRecord::toCpp(theRecord));
return ::djinni::Bool::fromCpp(objcpp_result_);
} DJINNI_TRANSLATE_EXCEPTIONS()
}
Expand Down
6 changes: 4 additions & 2 deletions test-suite/generated-src/objc/DBTestHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@
+ (nonnull DBSetRecord *)getSetRecord;

/**
* Method with long documentation
* Method with long documentation & doxygen
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
* @param theRecord the record to check
* @return whether the record is okay
*/
+ (BOOL)checkSetRecord:(nonnull DBSetRecord *)rec;
+ (BOOL)checkSetRecord:(nonnull DBSetRecord *)theRecord;

+ (nonnull DBPrimitiveList *)getPrimitiveList;

Expand Down

0 comments on commit 785a226

Please sign in to comment.