test/test_utils.cpp

changeset 646
dfd0403ff8b6
parent 633
63a692642aa2
equal deleted inserted replaced
645:ec50abb285ad 646:dfd0403ff8b6
35 j = 0; 35 j = 0;
36 cx_for_n(i, 50) { 36 cx_for_n(i, 50) {
37 EXPECT_EQ(i, j); 37 EXPECT_EQ(i, j);
38 j++; 38 j++;
39 } 39 }
40 }
41
42 TEST(Utils, swap_ptr) {
43 int i = 5;
44 int j = 8;
45 int *ip = &i;
46 int *jp = &j;
47 cx_swap_ptr(ip, jp);
48 EXPECT_EQ(ip, &j);
49 EXPECT_EQ(jp, &i);
40 } 50 }
41 51
42 TEST(Utils, szmul) { 52 TEST(Utils, szmul) {
43 size_t r; 53 size_t r;
44 int e; 54 int e;

mercurial