Skip to content

Commit

Permalink
test: allow region pragma in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nalgeon committed Aug 7, 2024
1 parent fd05c9e commit d1d04c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ LINIX_FLAGS := -z now -z relro -Wall -Wsign-compare -Wno-unknown-pragmas -fPIC -
WINDO_FLAGS := -shared -Isrc -DSQLEAN_VERSION=$(SQLEAN_VERSION)
WIN32_FLAGS := $(WINDO_FLAGS) -DSQLEAN_OMIT_UUID7
MACOS_FLAGS := -Wall -Wsign-compare -fPIC -dynamiclib -Isrc -DSQLEAN_VERSION=$(SQLEAN_VERSION)
CTEST_FLAGS := -Wall -Wsign-compare -Wno-unknown-pragmas -Isrc

prepare-dist:
mkdir -p dist
Expand Down Expand Up @@ -191,15 +192,15 @@ test:
@cat test.log | (! grep -Ex "[0-9_]+.[^1]")

ctest-all:
gcc -Wall -Isrc test/text/bstring.test.c src/text/*.c src/text/*/*.c -o text.bstring
gcc $(CTEST_FLAGS) test/text/bstring.test.c src/text/*.c src/text/*/*.c -o text.bstring
make ctest package=text module=bstring
gcc -Wall -Isrc test/text/rstring.test.c src/text/*.c src/text/*/*.c -o text.rstring
gcc $(CTEST_FLAGS) test/text/rstring.test.c src/text/*.c src/text/*/*.c -o text.rstring
make ctest package=text module=rstring
gcc -Wall -Isrc test/text/utf8.test.c src/text/utf8/*.c -o text.utf8
gcc $(CTEST_FLAGS) test/text/utf8.test.c src/text/utf8/*.c -o text.utf8
make ctest package=text module=utf8
gcc -Wall -Isrc test/time/time.test.c src/time/*.c -o time.time
gcc $(CTEST_FLAGS) test/time/time.test.c src/time/*.c -o time.time
make ctest package=time module=time
gcc -Wall -Isrc test/time/duration.test.c src/time/*.c -o time.duration -lm
gcc $(CTEST_FLAGS) test/time/duration.test.c src/time/*.c -o time.duration -lm
make ctest package=time module=duration

ctest:
Expand Down
2 changes: 1 addition & 1 deletion test/time/time.test.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static void test_get_part(void) {
DateTest test = date_tests[i];
Time t = time_unix(test.epoch, 0);
assert(time_get_year(t) == test.year);
assert(time_get_month(t) == test.month);
assert((int)time_get_month(t) == test.month);
assert(time_get_day(t) == test.day);
assert(time_get_hour(t) == test.hour);
assert(time_get_minute(t) == test.min);
Expand Down

0 comments on commit d1d04c1

Please sign in to comment.