Commit da3fab70 authored by Jaime Arias's avatar Jaime Arias
Browse files

Add tests

parent 0a5e9557
......@@ -4,5 +4,9 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
# project name and language
project(pn-parser LANGUAGES CXX)
# add source folder
# add source folder
add_subdirectory(src)
# add tests
enable_testing()
add_subdirectory(tests)
......@@ -14,6 +14,7 @@ flex_target(rdp_scanner RdPMonteur.l ${CMAKE_CURRENT_BINARY_DIR}/lexer.c)
add_flex_bison_dependency(rdp_scanner rdp_parser)
# generate a the library from sources
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
add_library(RdP
STATIC
Net.h
......
# set minimum cmake version
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
# project name and language
project(pn-parser-test LANGUAGES CXX)
# testing library
add_executable(RdPtest test.cpp)
target_link_libraries(RdPtest RdP)
# Add test
add_test(
NAME tests
COMMAND RdPtest
)
This diff is collapsed.
#define CATCH_CONFIG_MAIN
#include "Net.h"
#include "catch.hpp"
TEST_CASE("Parsing simple file", "[Simple]") {
net R("../examples/ring2.net", "../examples/Obs2_ring", "");
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment