Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-test
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
cellframe
libdap-test
Commits
5c3a582e
Commit
5c3a582e
authored
6 years ago
by
armatusmiles
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit
parents
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+7
-0
7 additions, 0 deletions
CMakeLists.txt
dap_test.c
+1
-0
1 addition, 0 deletions
dap_test.c
dap_test.h
+36
-0
36 additions, 0 deletions
dap_test.h
with
44 additions
and
0 deletions
CMakeLists.txt
0 → 100644
+
7
−
0
View file @
5c3a582e
cmake_minimum_required
(
VERSION 3.0
)
project
(
dap_test
)
add_library
(
${
PROJECT_NAME
}
STATIC dap_test.h dap_test.c
)
target_include_directories
(
dap_test INTERFACE .
)
This diff is collapsed.
Click to expand it.
dap_test.c
0 → 100644
+
1
−
0
View file @
5c3a582e
#include
"dap_test.h"
This diff is collapsed.
Click to expand it.
dap_test.h
0 → 100755
+
36
−
0
View file @
5c3a582e
#pragma once
#include
"assert.h"
#include
"stdbool.h"
#include
"stdlib.h"
#include
"stdio.h"
#include
"string.h"
#include
<stdio.h>
#define TEXT_COLOR_RED "\x1B[31m"
#define TEXT_COLOR_GRN "\x1B[32m"
#define TEXT_COLOR_YEL "\x1B[33m"
#define TEXT_COLOR_BLU "\x1B[34m"
#define TEXT_COLOR_MAG "\x1B[35m"
#define TEXT_COLOR_CYN "\x1B[36m"
#define TEXT_COLOR_WHT "\x1B[37m"
#define TEXT_COLOR_RESET "\x1B[0m"
#define dap_test_msg(msg) \
printf("\t%s%s%s\n", TEXT_COLOR_WHT, msg, TEXT_COLOR_RESET); \
/* PIF - print if failed. For checking value in loop, for don't repeat output */
#define dap_assert_PIF(expr, msg) \
if(expr) {} \
else { \
printf("\t%s%s FAILED!%s\n", TEXT_COLOR_RED, msg, TEXT_COLOR_RESET); \
exit(-1); }
#define dap_assert(expr, msg) \
if(expr) { \
printf("\t%s%s PASS.%s\n", TEXT_COLOR_GRN, msg, TEXT_COLOR_RESET); \
} else { \
printf("\t%s%s FAILED!%s\n", TEXT_COLOR_RED, msg, TEXT_COLOR_RESET); \
exit(-1); }\
#define dap_print_module_name(module_name) \
printf("%s%s passing the tests... %s\n", TEXT_COLOR_CYN, module_name, TEXT_COLOR_RESET);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment