void SWWReaderTest::testBedslopeNormalArray() { CPPUNIT_ASSERT( _sww->isValid() ); osg::ref_ptr<osg::Vec3Array> actual = _sww->getBedslopeNormalArray(); CPPUNIT_ASSERT( actual ); // expected number of bedslope normals const size_t nvertices = 24; CPPUNIT_ASSERT_EQUAL( actual->size(), nvertices ); // hard-coded values (bedslope is flat plane) using osg::Vec3; using osg::Vec3Array; Vec3Array *expected = new Vec3Array; expected->assign(24, Vec3( 0.301511, -0.301511, 0.904534 ) ); for (size_t i=0; i<nvertices; i++) CPPUNIT_ASSERT_VEC3_EQUAL( actual->at(i), expected->at(i) ); }