Statistics
| Revision:

root / trunk / tests / gtests / test_adstring_array.cpp @ 1154

History | View | Annotate | Download (495 Bytes)

1 1147 johnoel
#include <gtest/gtest.h>
2
#include <fvar.hpp>
3
#include <adstring.hpp>
4
5 1154 johnoel
class test_adstring_array: public ::testing::Test {};
6 1147 johnoel
7 1154 johnoel
TEST_F(test_adstring_array, equals)
8 996 johnoel
{
9 1154 johnoel
  adstring_array a(1, 4);
10
  a(1) = "one";
11
  a(2) = "two";
12
  a(3) = "three";
13
  a(4) = "four";
14
  adstring_array b;
15
  b = a;
16
17
  EXPECT_EQ(b.indexmin(), 1);
18
  EXPECT_EQ(b.indexmax(), 4);
19
  EXPECT_EQ(b(1), adstring("one"));
20
  EXPECT_EQ(b(2), adstring("two"));
21
  EXPECT_EQ(b(3), adstring("three"));
22
  EXPECT_EQ(b(4), adstring("four"));
23 996 johnoel
}