Skip to content

Commit

Permalink
Merge pull request #3251 from karlnapf/develop
Browse files Browse the repository at this point in the history
meta examples: fixes for java & R
  • Loading branch information
karlnapf committed Jun 8, 2016
2 parents d6407a5 + bac2321 commit 19e364a
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 661 deletions.
10 changes: 0 additions & 10 deletions examples/meta/CMakeLists.txt
Expand Up @@ -23,16 +23,6 @@ add_custom_target(meta_examples
INCLUDE(FindMetaExamples)
find_meta_examples()

# run the Python generator tests
IF(ENABLE_TESTING)
find_program(NOSETESTS nosetests)
IF(NOSETESTS)
add_test(NAME meta-examples-generator
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/generator
COMMAND ${NOSETESTS})
ENDIF(NOSETESTS)
ENDIF(ENABLE_TESTING)

# If testing is enabled we run the examples
IF(ENABLE_TESTING)
IF (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/data)
Expand Down
8 changes: 5 additions & 3 deletions examples/meta/generator/targets/java.json
@@ -1,9 +1,10 @@
{
"Program": "import org.shogun.*;\nimport org.jblas.*;\n\n${dependencies}class $programName {\nstatic {\nSystem.loadLibrary(\"modshogun\");\n}\n\npublic static void main(String argv[]) {\nmodshogun.init_shogun_with_defaults();\n\n$program$testing\n}\n}\n",
"Program": "import org.jblas.DoubleMatrix;\nimport org.jblas.FloatMatrix;\n\nimport org.shogun.modshogun;\n${dependencies}class $programName {\nstatic {\nSystem.loadLibrary(\"modshogun\");\n}\n\npublic static void main(String argv[]) {\nmodshogun.init_shogun_with_defaults();\n\n$program$testing\n}\n}\n",
"Dependencies": {
"AllDependencies": "$enumDependencies\n\n",
"AllDependencies": "$interfacedClassDependencies\n$enumDependencies\n\n",
"InterfacedClassDependencies": "$classlist\n",
"EnumDependencies": "$enums",
"DependencyListElementClass": "$element",
"DependencyListElementClass": "import org.shogun.$element;",
"DependencyListElementEnum": "import static org.shogun.$type.$value;",
"DependencyListSeparator": "\n"
},
Expand All @@ -16,6 +17,7 @@
"Assign": "$name = $expr",
"Type": {
"Default": "$type",
"Math": "org.shogun.Math",
"bool": "boolean",
"int": "int",
"float": "float",
Expand Down
2 changes: 1 addition & 1 deletion examples/meta/generator/targets/r.json
Expand Up @@ -18,7 +18,7 @@
},
"NumberLiteral": "$number",
"MethodCall": "$object$$$method($arguments)",
"StaticCall": "$type$$$$method($arguments)",
"StaticCall": "$type$$$method($arguments)",
"Identifier": "$identifier",
"Enum":"\"$value\""
},
Expand Down
160 changes: 0 additions & 160 deletions examples/meta/generator/tests/test_translate_java.py

This file was deleted.

146 changes: 0 additions & 146 deletions examples/meta/generator/tests/test_translate_octave.py

This file was deleted.

0 comments on commit 19e364a

Please sign in to comment.