Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
refactor: move assert_equals into own python module
plus some whitespace
  • Loading branch information
arnemertz committed Aug 2, 2021
1 parent 41475f8 commit d4e959f
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 14 deletions.
1 change: 0 additions & 1 deletion .clang-format
Expand Up @@ -97,4 +97,3 @@ SpacesInSquareBrackets: false
Standard: c++20
TabWidth: 8
UseTab: Never

2 changes: 0 additions & 2 deletions CMakeLists.txt
Expand Up @@ -52,5 +52,3 @@ if (ENABLE_TESTING)
enable_testing()
add_subdirectory(test)
endif ()


2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -7,4 +7,4 @@ This is going to be a project for me to learn and practice techniques, libraries
I will blog along and write a developer diary.
See http://arne-mertz.de/category/fix/ for more info.

In the current state I won't accept pull requests and issues.
In the current state I won't accept pull requests.
2 changes: 0 additions & 2 deletions behave/fix_cli.feature
@@ -1,7 +1,5 @@
Feature: Fix CLI behavior

@wip
@skip
Scenario: Show usage when called without arguments
When we call Fix without arguments
Then it prints usage information
Expand Down
3 changes: 3 additions & 0 deletions behave/steps/assertions.py
@@ -0,0 +1,3 @@

def assert_equals(a, b):
assert(a == b), "{} should equal {}!".format(a, b)
5 changes: 1 addition & 4 deletions behave/steps/fix_cli.py
@@ -1,12 +1,9 @@
from behave import given, when, then
from assertions import *
import pexpect

fix_executable = '../cmake-build-debug/bin/fix'


def assert_equals(a, b):
assert(a == b), "{} should equal {}!".format(a, b)

def _start_fix_with_args(context, args):
context.fix = pexpect.spawn(fix_executable, args=args)

Expand Down
2 changes: 1 addition & 1 deletion src/fix_cli/CMakeLists.txt
Expand Up @@ -5,4 +5,4 @@ set(FIX_CLI_SOURCES

add_library(fix_cli ${FIX_CLI_SOURCES})
target_link_libraries(fix_cli PRIVATE project_warnings project_options)
target_include_directories(fix_cli PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
target_include_directories(fix_cli PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
1 change: 0 additions & 1 deletion test/CMakeLists.txt
Expand Up @@ -10,4 +10,3 @@ target_link_libraries(catch_main PUBLIC CONAN_PKG::catch2)
target_link_libraries(catch_main PRIVATE project_options)

add_subdirectory(fix_cli)

2 changes: 0 additions & 2 deletions test/catch_main.cpp
@@ -1,5 +1,3 @@
#define CATCH_CONFIG_MAIN // This tells the catch header to generate a main

#include <catch2/catch.hpp>


0 comments on commit d4e959f

Please sign in to comment.