Revision 1154

trunk/tests/gtests/test_adstring_array.cpp (revision 1154)
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
}
trunk/tests/gtests/Makefile (revision 1154)
3 3
all: gtest-all
4 4
	./gtest-all
5 5

  
6
gtest-all: main.cpp test_adstring_strcase.cpp test_fmm_control.cpp test_atan2.cpp
6
gtest-all: main.cpp test_adstring_strcase.cpp test_fmm_control.cpp test_atan2.cpp test_adstring_array.cpp
7 7
	cp $(GTEST_DIR)/gtest-all.o .
8 8
	CXXFLAGS=-I$(GTEST_DIR)/include ../../admb gtest-all.o $^
9 9

  

Also available in: Unified diff