blob: 25423759215e95bd87f1c48b42196e193d39aa82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include <criterion/criterion.h>
#include <criterion/assert.h>
#include <misc/unique.hh>
#include <string>
Test(unique_string, simple)
{
misc::unique<std::string> the_answer = std::string("skibidi");
misc::unique<std::string> the_same_answer = std::string("skibidi");
misc::unique<std::string> the_solution = std::string("yes yes");
cr_expect_eq(the_answer, misc::unique<std::string>(std::string("skibidi")));
cr_expect_eq(the_answer, the_same_answer);
cr_expect_neq(the_answer, the_solution);
cr_expect_eq(the_answer.get(), the_same_answer.get());
cr_expect_eq(the_answer.get(), misc::unique<std::string>(std::string("skibidi")).get());
cr_expect_neq(the_answer.get(), the_solution.get());
}
|