blob: 8831b62cf4af59307297e11c43b65fba3f640142 [file] [log] [blame]
Brad Bishopa669a502021-08-03 16:01:43 -04001#include "../internal.h"
2#include "utils.h"
3
4#include <gtest/gtest.h>
5
6TEST(TestSarray, Dup)
7{
8 auto a = generate_test_sarray(3);
9
10 auto size = sarraylen(a);
11 EXPECT_EQ(size, 3);
12
13 auto b = sarraydup(a);
14 size_t i;
15
16 for (i = 0; i < 4; i++)
17 {
18 EXPECT_STREQ(a[i], b[i]);
19 }
20 sarrayfree(a);
21 sarrayfree(b);
22}