fix(examples/lean): add all examples to test suite
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
13f9454fe1
commit
4e4fea1eca
3 changed files with 12 additions and 6 deletions
|
@ -2,5 +2,5 @@ Definition a : Nat := 10
|
||||||
(* Trivial indicates a "proof by evaluation" *)
|
(* Trivial indicates a "proof by evaluation" *)
|
||||||
Theorem T1 : a > 0 := Trivial
|
Theorem T1 : a > 0 := Trivial
|
||||||
Theorem T2 : a - 5 > 3 := Trivial
|
Theorem T2 : a - 5 > 3 := Trivial
|
||||||
(* The next one fails *)
|
(* The next one is commented because it fails *)
|
||||||
Theorem T3 : a > 11 := Trivial
|
(* Theorem T3 : a > 11 := Trivial *)
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
**)
|
**)
|
||||||
|
|
||||||
Theorem T (a b : Bool) : a => b => a /\ b := _.
|
Theorem T (a b : Bool) : a => b => a /\ b := _.
|
||||||
apply (** REPEAT(ORELSE(imp_tactic, conj_in_lua)) .. assumption_tactic **)
|
apply (** REPEAT(ORELSE(imp_tac, conj_in_lua)) .. assumption_tac **)
|
||||||
done
|
done
|
||||||
|
|
||||||
(* Show proof created using our script *)
|
(* Show proof created using our script *)
|
||||||
|
|
|
@ -3,11 +3,17 @@ include_directories("${LEAN_BINARY_DIR}")
|
||||||
add_executable(lean lean.cpp)
|
add_executable(lean lean.cpp)
|
||||||
add_dependencies(lean githash)
|
add_dependencies(lean githash)
|
||||||
target_link_libraries(lean ${EXTRA_LIBS})
|
target_link_libraries(lean ${EXTRA_LIBS})
|
||||||
add_test(example1 ${CMAKE_CURRENT_BINARY_DIR}/lean "${LEAN_SOURCE_DIR}/../examples/lean/ex1.lean")
|
|
||||||
add_test(example2 ${CMAKE_CURRENT_BINARY_DIR}/lean "${LEAN_SOURCE_DIR}/../examples/lean/ex2.lean")
|
|
||||||
add_test(example3 ${CMAKE_CURRENT_BINARY_DIR}/lean "${LEAN_SOURCE_DIR}/../examples/lean/ex3.lean")
|
|
||||||
add_test(example1_stdin ${CMAKE_CURRENT_BINARY_DIR}/lean < "${LEAN_SOURCE_DIR}/../examples/lean/ex1.lean")
|
add_test(example1_stdin ${CMAKE_CURRENT_BINARY_DIR}/lean < "${LEAN_SOURCE_DIR}/../examples/lean/ex1.lean")
|
||||||
|
|
||||||
|
# LEAN EXAMPLES
|
||||||
|
file(GLOB LEANEXAMPLES "${LEAN_SOURCE_DIR}/../examples/lean/*.lean")
|
||||||
|
FOREACH(T ${LEANEXAMPLES})
|
||||||
|
GET_FILENAME_COMPONENT(T_NAME ${T} NAME)
|
||||||
|
add_test(NAME "leanex_${T_NAME}"
|
||||||
|
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/lean ${T})
|
||||||
|
ENDFOREACH(T)
|
||||||
|
|
||||||
# LEAN TESTS
|
# LEAN TESTS
|
||||||
file(GLOB LEANTESTS "${LEAN_SOURCE_DIR}/../tests/lean/*.lean")
|
file(GLOB LEANTESTS "${LEAN_SOURCE_DIR}/../tests/lean/*.lean")
|
||||||
FOREACH(T ${LEANTESTS})
|
FOREACH(T ${LEANTESTS})
|
||||||
|
|
Loading…
Reference in a new issue