Statistics
| Revision:

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

History | View | Annotate | Download (495 Bytes)

1
#include <gtest/gtest.h>
2
#include <fvar.hpp>
3
#include <adstring.hpp>
4

    
5
class test_adstring_array: public ::testing::Test {};
6

    
7
TEST_F(test_adstring_array, equals)
8
{
9
  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
}