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.

24 lines
514 B

#include <gtest/gtest.h>
#include <cstdlib>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "wsfs/server.h"
#include "wsfs/server_config.h"
TEST(server, create_dispose)
{
mkdir("test", 0700);
struct wsfs_server_config config = {strdup("test"), nullptr, nullptr, nullptr, nullptr, 0};
struct wsfs_server * server = wsfs_server_create(&config);
ASSERT_NE(nullptr, server);
wsfs_server_dispose(server);
wsfs_server_config_cleanup(&config);
rmdir("test");
}