Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

minimise test compilation time; add test script and actions CI file#5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Z80coder merged 3 commits intomasterfromminimise-test-compilation
Apr 28, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions.github/workflows/linux_check.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
name: CI for Linux

on: push

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: build
run: |
mkdir build && cd build
cmake ../src
make
cd ..
- name: regression test
run: |
cd tests
pwd
ls -l
./run_tests.sh
5 changes: 5 additions & 0 deletionssrc/CMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,12 +21,17 @@ project("datalog-cpp")
# specify the C++ standard
set(CMAKE_CXX_STANDARD 17)

# unit-test library
add_library(tests_main STATIC ../tests/tests_main.cpp)

# types_test target
add_executable(types_test ../tests/types_test.cpp)
target_include_directories(types_test PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(types_test tests_main)
target_compile_definitions(types_test PUBLIC UNIX)

# variable_test target
add_executable(variable_test ../tests/variable_test.cpp)
target_include_directories(variable_test PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(variable_test tests_main)
target_compile_definitions(variable_test PUBLIC UNIX)
4 changes: 4 additions & 0 deletionstests/run_tests.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e
../build/types_test
../build/variable_test
3 changes: 3 additions & 0 deletionstests/tests_main.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
// tests-main.cpp
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
3 changes: 0 additions & 3 deletionstests/types_test.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
// Let Catch provide main():
#define CATCH_CONFIG_MAIN

#include "catch.hpp"
#include "Datalog.h"

Expand Down
7 changes: 2 additions & 5 deletionstests/variable_test.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
// Let Catch provide main():
#define CATCH_CONFIG_MAIN

#include "catch.hpp"
#include "Variable.h"

Expand All@@ -18,9 +15,9 @@ bool boundVariableTest() {
}

TEST_CASE( "An new variable is unbound", "[variable]" ) {
REQUIRE( freeVariableTest() );
REQUIRE( freeVariableTest()== true);
}

TEST_CASE( "A variable with a value is bound", "[variable]" ) {
REQUIRE(freeVariableTest() );
REQUIRE(boundVariableTest() == true );
}

[8]ページ先頭

©2009-2025 Movatter.jp