-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d22b32
commit 7cc2db3
Showing
7 changed files
with
73 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This file is licensed under the WTFPL version 2 -- you can see the full | ||
# license over at https://www.wtfpl.net/txt/copying/ | ||
# | ||
# - Try to find Criterion | ||
# | ||
# Once done this will define | ||
# CRITERION_FOUND - System has Criterion | ||
# CRITERION_INCLUDE_DIRS - The Criterion include directories | ||
# CRITERION_LIBRARIES - The libraries needed to use Criterion | ||
|
||
find_package(PkgConfig) | ||
|
||
find_path(CRITERION_INCLUDE_DIR criterion/criterion.h | ||
PATH_SUFFIXES criterion) | ||
|
||
find_library(CRITERION_LIBRARY NAMES criterion libcriterion) | ||
|
||
set(CRITERION_LIBRARIES ${CRITERION_LIBRARY}) | ||
set(CRITERION_INCLUDE_DIRS ${CRITERION_INCLUDE_DIR}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
# handle the QUIET and REQUIRED arguments and set CRITERION_FOUND to TRUE | ||
# if all listed variables are TRUE | ||
find_package_handle_standard_args(Criterion DEFAULT_MSG | ||
CRITERION_LIBRARY CRITERION_INCLUDE_DIR) | ||
|
||
mark_as_advanced(CRITERION_INCLUDE_DIR CRITERION_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
cmake_minimum_required(VERSION 3.0.2) | ||
|
||
add_executable(data_operations_test data_operations_test.c) | ||
target_link_libraries(data_operations_test criterion) | ||
|
||
add_test(NAME data_operations_test WORKING_DIRECTORY fuseecs/test COMMAND ./data_operations_test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <string.h> | ||
#include <criterion/criterion.h> | ||
#include <criterion/new/assert.h> | ||
#include "../data_operations.h" | ||
|
||
Test(data_operations_test_suite, local_string_concatenation_test) { | ||
LOCAL_STR_CAT("foo", "bar", concatenated_string) | ||
cr_assert(eq(str, concatenated_string, "foobar"), "Did not concatenate strings as expected!"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters