/*
  file2Grid.cpp ‚ÌƒeƒXƒg
  Satofumi KAMIMURA
  $Id: File2GridTest.cpp 286 2008-10-20 09:40:22Z satofumi $
*/

#include "File2GridTest.h"
#include "file2Grid.h"

CPPUNIT_TEST_SUITE_REGISTRATION(File2GridTest);
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(File2GridTest, "File2GridTest");


void File2GridTest::readTest(void) {
  std::vector<VXV::Grid> inputs;
  File2Grid(inputs, "grid2d.dat");
  CPPUNIT_ASSERT_EQUAL(3, (int)inputs.size());

  CPPUNIT_ASSERT_EQUAL(1, inputs[0].x);
  CPPUNIT_ASSERT_EQUAL(2, inputs[0].y);

  CPPUNIT_ASSERT_EQUAL(3, inputs[1].x);
  CPPUNIT_ASSERT_EQUAL(4, inputs[1].y);

  CPPUNIT_ASSERT_EQUAL(5, inputs[2].x);
  CPPUNIT_ASSERT_EQUAL(6, inputs[2].y);
}
