C and C++ web framework. http://rapida.vilor.one/docs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
550 B

/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Copyright 2022 Ivan Polyakov */
#include "app.h"
#include "tests.hxx"
using namespace rpd;
TEST_CASE("Application")
{
rpd_app app;
int res = rpd_app_create(&app);
SECTION("App creation")
{
REQUIRE(res == 0);
}
SECTION("Adding route")
{
auto handle = [](rpd_req *req, rpd_res *res, void *userdata) {};
REQUIRE(rpd_app_add_route(&app, "/", handle, NULL) == 0);
REQUIRE(app.routes_len == 1);
REQUIRE(app.routes != NULL);
}
}