test: port test-uid-range to tests.h

This commit is contained in:
Lennart Poettering
2022-04-01 11:20:12 +02:00
parent 09bbaa419b
commit 2e37ebdae9
+4 -3
View File
@@ -3,11 +3,12 @@
#include <stddef.h>
#include "alloc-util.h"
#include "tests.h"
#include "uid-range.h"
#include "user-util.h"
#include "util.h"
int main(int argc, char *argv[]) {
TEST(uid_range) {
_cleanup_free_ UidRange *p = NULL;
size_t n = 0;
uid_t search;
@@ -69,6 +70,6 @@ int main(int argc, char *argv[]) {
assert_se(n == 1);
assert_se(p[0].start == 20);
assert_se(p[0].nr == 1983);
return 0;
}
DEFINE_TEST_MAIN(LOG_DEBUG);