Commit 96f6b25a authored by Kenneth Leiter's avatar Kenneth Leiter

COMP: Fix includes in tests for iostream.

Fix warnings for outputting NULL to cout
parent fa4993fc
......@@ -19,7 +19,7 @@ int main(int, char **)
std::cout << array->getSize() << " ?= " << 0 << std::endl;
std::cout << array->getArrayType() << " ?= " << XdmfArrayType::Uninitialized() << std::endl;
std::cout << array->getValuesString() << " ?= " << "" << std::endl;
std::cout << array->getValuesInternal() << " ?= " << NULL << std::endl;
std::cout << array->getValuesInternal() << " ?= " << "NULL" << std::endl;
assert(array->getSize() == 0);
assert(array->getArrayType() == XdmfArrayType::Uninitialized());
assert(array->getValuesString() == "");
......@@ -272,7 +272,7 @@ int main(int, char **)
// Assert we can't get an int vector out of our array.
shared_ptr<std::vector<int> > storedValues2Int =
array6->getValuesInternal<int>();
std::cout << storedValues2Int << " ?= " << NULL << std::endl;
std::cout << storedValues2Int << " ?= " << "NULL" << std::endl;
assert(storedValues2Int == NULL);
//
......
#include "XdmfArray.hpp"
#include <iostream>
int main(int, char **)
{
......
......@@ -14,7 +14,8 @@ int main(int, char **)
// Default operation - Always write to separate datasets.
//
std::cout << array->getHeavyDataController() << " ?= " << NULL << std::endl;
std::cout << array->getHeavyDataController() << " ?= " << "NULL"
<< std::endl;
assert(array->getHeavyDataController() == NULL);
shared_ptr<XdmfHDF5Writer> writer = XdmfHDF5Writer::New("hdf5WriterTest.h5");
......
......@@ -29,8 +29,10 @@ int main(int, char **)
assert(information1->getValue().compare("Value1") == 0);
std::cout << information->getNumberInformations() << " ?= " << 0 << std::endl;
std::cout << information->getInformation(0) << " ?= " << NULL << std::endl;
std::cout << information->getInformation("foo") << " ?= " << NULL << std::endl;
std::cout << information->getInformation(0) << " ?= " << "NULL"
<< std::endl;
std::cout << information->getInformation("foo") << " ?= " << "NULL"
<< std::endl;
assert(information->getNumberInformations() == 0);
assert(information->getInformation(0) == NULL);
......@@ -46,10 +48,14 @@ int main(int, char **)
assert(information->getNumberInformations() == 1);
std::cout << information->getInformation(0) << " ?= " << information1 << std::endl;
std::cout << information->getInformation(1) << " ?= " << NULL << std::endl;
std::cout << information->getInformation("Key1") << " ?= " << information1 << std::endl;
std::cout << information->getInformation("foo") << " ?= " << NULL << std::endl;
std::cout << information->getInformation(0) << " ?= " << information1
<< std::endl;
std::cout << information->getInformation(1) << " ?= " << "NULL"
<< std::endl;
std::cout << information->getInformation("Key1") << " ?= " << information1
<< std::endl;
std::cout << information->getInformation("foo") << " ?= " << "NULL"
<< std::endl;
assert(information->getInformation(0) == information1);
assert(information->getInformation(1) == NULL);
......
......@@ -67,7 +67,7 @@ int main(int, char **)
shared_ptr<XdmfReader> reader = XdmfReader::New();
shared_ptr<XdmfArray> array =
shared_dynamic_cast<XdmfArray>(reader->read("TestXdmfBinary.xmf"));
std::cout << array << " ?!= " << NULL << std::endl;
std::cout << array << " ?!= " << "NULL" << std::endl;
assert(array != NULL);
return 0;
......
......@@ -2,6 +2,8 @@
#include "XdmfGeometryType.hpp"
#include "XdmfSharedPtr.hpp"
#include <iostream>
int main(int, char **)
{
// Test != and == operators
......
......@@ -5,6 +5,8 @@
#include "XdmfReader.hpp"
#include "XdmfWriter.hpp"
#include <iostream>
int main(int, char **)
{
......
......@@ -4,6 +4,8 @@
#include "XdmfReader.hpp"
#include "XdmfWriter.hpp"
#include <iostream>
int main(int, char **)
{
......
......@@ -9,6 +9,8 @@
#include "XdmfTestCompareFiles.hpp"
#include <iostream>
int main(int, char **)
{
shared_ptr<XdmfRegularGrid> grid = XdmfRegularGrid::New(1, 1, 1,
......
......@@ -24,8 +24,8 @@ int main(int, char **)
assert(set->getName().compare("TEST") == 0);
std::cout << set->getNumberAttributes() << " ?= " << 0 << std::endl;
std::cout << set->getAttribute("") << " ?= " << NULL << std::endl;
std::cout << set->getAttribute(0) << " ?= " << NULL << std::endl;
std::cout << set->getAttribute("") << " ?= " << "NULL" << std::endl;
std::cout << set->getAttribute(0) << " ?= " << "NULL" << std::endl;
assert(set->getNumberAttributes() == 0);
assert(set->getAttribute("") == NULL);
assert(set->getAttribute(0) == NULL);
......
#include "XdmfTopology.hpp"
#include "XdmfTopologyType.hpp"
#include <iostream>
void setPolyTopology(shared_ptr<XdmfTopology> polyTop)
{
polyTop->setType(XdmfTopologyType::Polygon(6));
......
......@@ -4,6 +4,8 @@
#include "XdmfSet.hpp"
#include "XdmfTime.hpp"
#include <iostream>
int main(int, char **)
{
shared_ptr<XdmfUnstructuredGrid> grid = XdmfUnstructuredGrid::New();
......@@ -22,8 +24,8 @@ int main(int, char **)
std::cout << grid->getNumberAttributes() << " ?= " << 1 << std::endl;
std::cout << grid->getAttribute(0) << " ?= " << attr << std::endl;
std::cout << grid->getAttribute("foo") << " ?= " << attr << std::endl;
std::cout << grid->getAttribute(1) << " ?= " << NULL << std::endl;
std::cout << grid->getAttribute("foo1") << " ?= " << NULL << std::endl;
std::cout << grid->getAttribute(1) << " ?= " << "NULL" << std::endl;
std::cout << grid->getAttribute("foo1") << " ?= " << "NULL" << std::endl;
assert(grid->getNumberAttributes() == 1);
assert(grid->getAttribute(0) == attr);
assert(grid->getAttribute("foo") == attr);
......@@ -39,8 +41,8 @@ int main(int, char **)
std::cout << grid->getNumberSets() << " ?= " << 1 << std::endl;
std::cout << grid->getSet(0) << " ?= " << set << std::endl;
std::cout << grid->getSet("foo") << " ?= " << set << std::endl;
std::cout << grid->getSet(1) << " ?= " << NULL << std::endl;
std::cout << grid->getSet("foo1") << " ?= " << NULL << std::endl;
std::cout << grid->getSet(1) << " ?= " << "NULL" << std::endl;
std::cout << grid->getSet("foo1") << " ?= " << "NULL" << std::endl;
assert(grid->getNumberSets() == 1);
assert(grid->getSet(0) == set);
assert(grid->getSet("foo") == set);
......@@ -48,7 +50,7 @@ int main(int, char **)
assert(grid->getSet(1) == NULL);
// Insert Time
std::cout << grid->getTime() << " ?= " << NULL << std::endl;
std::cout << grid->getTime() << " ?= " << "NULL" << std::endl;
assert(grid->getTime() == NULL);
shared_ptr<XdmfTime> time = XdmfTime::New(0);
grid->setTime(time);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment