mirror of
https://github.com/falk-werner/webfuse
synced 2024-10-27 20:34:10 +00:00
28 lines
409 B
C++
28 lines
409 B
C++
#include "webfuse/filesystem/userid.hpp"
|
|
#include <gtest/gtest.h>
|
|
|
|
using webfuse::user_id;
|
|
|
|
TEST(user_id, invalid)
|
|
{
|
|
user_id invalid_user;
|
|
|
|
ASSERT_EQ(user_id::invalid, invalid_user);
|
|
}
|
|
|
|
TEST(user_id, to_uid)
|
|
{
|
|
user_id user(42);
|
|
uid_t id = user.to_uid();
|
|
|
|
ASSERT_EQ(42, id);
|
|
}
|
|
|
|
TEST(user_id, from_uid)
|
|
{
|
|
uid_t id = 23;
|
|
auto user = user_id::from_uid(id);
|
|
|
|
ASSERT_EQ(23, user);
|
|
}
|