Skip to content

Commit

Permalink
Merge pull request #5 from mudream4869/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
mudream4869 authored Nov 30, 2020
2 parents 298fe91 + 72824d8 commit 02ffd60
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 26 deletions.
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ add_library(cablin
target_link_libraries(cablin
${YAML_CPP_LIBRARIES})

# ----------
# Installation

install(TARGETS cablin
LIBRARY
DESTINATION lib)

install(DIRECTORY include/mukyu/cablin
DESTINATION include/mukyu/cablin)

# ----------
# Interpreter

Expand All @@ -62,4 +72,4 @@ add_subdirectory(example)
# ----------
# Unit Test

add_subdirectory(test)
add_subdirectory(tests)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- import: test5
- import: func-return

- func:
name: main
Expand All @@ -9,8 +9,8 @@
name: a
default_value: 30

# test5::myFunc(a)
# func-return::myFunc(a)
- call:
name: test5::myFunc
name: func-return::myFunc
params:
- get: a
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
var:
type: string
name: a
default_value: 1哈哈1
default_value: hello

- call:
name: io::print
Expand Down
14 changes: 0 additions & 14 deletions cablin_examples/test8.yaml

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
params:
- get: a

# a = a - one
# a = a - 1
- assign:
target: a
source:
Expand Down
2 changes: 1 addition & 1 deletion cablin_examples/test2.yaml → cablin_examples/while.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
params:
- get: a

# a = a - one
# a = a - 1
- assign:
target: a
source:
Expand Down
11 changes: 6 additions & 5 deletions test/CMakeLists.txt → tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.6.2)

enable_testing()

find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIR})

Expand All @@ -20,10 +18,13 @@ set(cablin_test_function_src
"src/function/test_functor.cpp"
"src/function/test_node.cpp")

add_executable(test
add_executable(unit_tests
${cablin_test_command_src}
${cablin_test_expr_src}
${cablin_test_function_src})

add_dependencies(test cablin)
target_link_libraries(test cablin ${GTEST_BOTH_LIBRARIES})
add_dependencies(unit_tests cablin)
target_link_libraries(unit_tests cablin ${GTEST_BOTH_LIBRARIES})

add_test(NAME unit_tests
COMMAND unit_tests)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 02ffd60

Please sign in to comment.