Skip to content

Commit

Permalink
Fix typos in bindings
Browse files Browse the repository at this point in the history
Signed-off-by: Kitsu <[email protected]>
  • Loading branch information
l4l authored and kamilsa committed Dec 27, 2017
1 parent 74440af commit f77db2a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions test/module/shared_model/bindings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ endif()

if (SWIG_PYTHON)
find_package(PythonInterp 2.7 REQUIRED)
add_test(NAME python_builders_test
add_test(NAME python_transaction_test
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/builder-test.py
WORKING_DIRECTORY ${SWIG_BUILD_DIR})
add_test(NAME python_queries_test
add_test(NAME python_query_test
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/query-test.py
WORKING_DIRECTORY ${SWIG_BUILD_DIR})

Expand All @@ -39,7 +39,7 @@ if (SWIG_PYTHON)

add_custom_target(python_tests
DEPENDS "${PROTO_SWIG_DEPS}")
foreach(test "python_builders_test" "python_queries_test")
foreach(test "python_transaction_test" "python_query_test")
set_tests_properties(${test}
PROPERTIES REQUIRED_FILES "${PROTO_SWIG_DEPS}"
ENVIRONMENT "PYTHONPATH=$ENV{PYTHONPATH}:${SWIG_BUILD_DIR}"
Expand Down
20 changes: 10 additions & 10 deletions test/module/shared_model/bindings/QueryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ void keygen() {
}

/**
* Performs check that Blob contains valid proto Transaction
* Performs check that Blob contains valid proto Query
* @param serialized blob with binary data for check
* @return true if valid
*/
private <T> boolean checkProtoTx(Blob serialized) {
private <T> boolean checkProtoQuery(Blob serialized) {
ByteVector blob = serialized.blob();
byte bs[] = new byte[(int)blob.size()];

Expand All @@ -102,48 +102,48 @@ private <T> boolean checkProtoTx(Blob serialized) {
@Test
void getAccount() {
UnsignedQuery query = builder.getAccount("user@test").build();
assertTrue(checkProtoTx(proto(query)));
assertTrue(checkProtoQuery(proto(query)));
}

@Test
void getSignatories() {
UnsignedQuery query = builder.getSignatories("user@test").build();
assertTrue(checkProtoTx(proto(query)));
assertTrue(checkProtoQuery(proto(query)));
}

@Test
void getAccountTransactions() {
UnsignedQuery query = builder.getAccountTransactions("user@test").build();
assertTrue(checkProtoTx(proto(query)));
assertTrue(checkProtoQuery(proto(query)));
}

@Test
void getAccountAssetTransactions() {
UnsignedQuery query = builder.getAccountAssetTransactions("user@test", "coin#test").build();
assertTrue(checkProtoTx(proto(query)));
assertTrue(checkProtoQuery(proto(query)));
}

@Test
void getAccountAssets() {
UnsignedQuery query = builder.getAccountAssets("user@test", "coin#test").build();
assertTrue(checkProtoTx(proto(query)));
assertTrue(checkProtoQuery(proto(query)));
}

@Test
void getRoles() {
UnsignedQuery query = builder.getRoles().build();
assertTrue(checkProtoTx(proto(query)));
assertTrue(checkProtoQuery(proto(query)));
}

@Test
void getAssetInfo() {
UnsignedQuery query = builder.getAssetInfo("coin#test").build();
assertTrue(checkProtoTx(proto(query)));
assertTrue(checkProtoQuery(proto(query)));
}

@Test
void getRolePermissions() {
UnsignedQuery query = builder.getRolePermissions("user").build();
assertTrue(checkProtoTx(proto(query)));
assertTrue(checkProtoQuery(proto(query)));
}
}

0 comments on commit f77db2a

Please sign in to comment.