using fct tests; getHeader test

sayer/1.4-spce2.6
Stefan Sayer 16 years ago
parent 9e15e1e9b0
commit 24d93e326f

@ -12,13 +12,14 @@ HDRS=$(SRCS:.cpp=.h)
OBJS=$(SRCS:.cpp=.o)
DEPS=$(SRCS:.cpp=.d)
CPPFLAGS += -I..
CPPFLAGS += -I.. -DNOMAIN
.PHONY: all
all: ../../Makefile.defs
-@$(MAKE) core_deps && $(MAKE) deps && \
$(MAKE) $(NAME)
$(MAKE) $(NAME) && \
./$(NAME)
.PHONY: sip_stack
sip_stack:

File diff suppressed because it is too large Load Diff

@ -1,14 +1,39 @@
#include "log.h"
#include <string>
#include <vector>
#include <map>
#include <string.h>
int main(int argc, char* argv[])
{
init_logging();
log_stderr = true;
log_level = 3;
DBG("yeah!\n");
return 0;
}
#include "AmConfig.h"
#include "fct.h" /* FCTX is installed! */
#include "AmSipMsg.h"
#include "AmSipHeaders.h"
#include "fct.h"
FCT_BGN() {
FCTMF_SUITE_CALL(test_headers);
} FCT_END();
// FCT_BGN() {
// FCT_FIXTURE_SUITE_BGN(example_suite) {
// FCT_SETUP_BGN() {
// } FCT_SETUP_END();
// FCT_TEARDOWN_BGN() {
// } FCT_TEARDOWN_END();
// FCT_TEST_BGN(test_object_basic) {
// } FCT_TEST_END();
// } FCT_FIXTURE_SUITE_END();
// } FCT_END();

@ -0,0 +1,15 @@
#include "fct.h"
#include "AmSipHeaders.h"
#include "AmSipMsg.h"
FCTMF_SUITE_BGN(test_headers) {
FCT_TEST_BGN(getHeader_simple) {
fct_chk( getHeader("P-My-Test: myval" CRLF, "P-My-Test") == "myval");
} FCT_TEST_END();
FCT_TEST_BGN(getHeader_multi) {
fct_chk( getHeader("P-My-Test: myval" CRLF "P-My-Test: myval2" CRLF , "P-My-Test") == "myval");
} FCT_TEST_END();
} FCTMF_SUITE_END();
Loading…
Cancel
Save