Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
af7efd98
Commit
af7efd98
authored
Dec 06, 2013
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjusting unit test for core
parent
2cb325c9
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
610 additions
and
136 deletions
+610
-136
Makefile
build/Makefile
+3
-0
core.c
build/src/core.c
+479
-16
core.h
build/src/core.h
+1
-0
unit_test.c
test/unit_test.c
+127
-120
No files found.
build/Makefile
View file @
af7efd98
...
@@ -70,6 +70,9 @@ all:
...
@@ -70,6 +70,9 @@ all:
unix_unit_test
:
$(LUA_SOURCES) Makefile ../test/unit_test.c
unix_unit_test
:
$(LUA_SOURCES) Makefile ../test/unit_test.c
$(CC)
../test/unit_test.c lua_5.2.1.c
$(CFLAGS)
-g
-O0
-o
t
&&
./t
$(CC)
../test/unit_test.c lua_5.2.1.c
$(CFLAGS)
-g
-O0
-o
t
&&
./t
core_unit_test
:
Makefile ../test/unit_test.c
$(CC)
../test/unit_test.c
$(CFLAGS)
-g
-O0
-o
t
&&
./t
# Make sure that the compiler flags come last in the compilation string.
# Make sure that the compiler flags come last in the compilation string.
# If not so, this can break some on some Linux distros which use
# If not so, this can break some on some Linux distros which use
# "-Wl,--as-needed" turned on by default in cc command.
# "-Wl,--as-needed" turned on by default in cc command.
...
...
build/src/core.c
View file @
af7efd98
This diff is collapsed.
Click to expand it.
build/src/core.h
View file @
af7efd98
...
@@ -81,6 +81,7 @@ int mg_get_var(const struct mg_connection *conn,
...
@@ -81,6 +81,7 @@ int mg_get_var(const struct mg_connection *conn,
const
char
*
var_name
,
char
*
dst
,
size_t
dst_len
);
const
char
*
var_name
,
char
*
dst
,
size_t
dst_len
);
int
mg_get_cookie
(
const
char
*
cookie
,
const
char
*
var_name
,
int
mg_get_cookie
(
const
char
*
cookie
,
const
char
*
var_name
,
char
*
buf
,
size_t
buf_len
);
char
*
buf
,
size_t
buf_len
);
int
mg_parse_header
(
const
char
*
hdr
,
const
char
*
var_name
,
char
*
buf
,
size_t
);
// Utility functions
// Utility functions
int
mg_start_thread
(
void
*
(
*
func
)(
void
*
),
void
*
param
);
int
mg_start_thread
(
void
*
(
*
func
)(
void
*
),
void
*
param
);
...
...
test/unit_test.c
View file @
af7efd98
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment