[MOAB-dev] commit/MOAB: danwu: In read_nc unit test, check some tags with double-underscore in the name. It would fail for revisions before commit e7850db (fixed a bug related to stringstream: ss_tag_name.clear() does not empty the string).

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Oct 24 12:20:21 CDT 2013


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/33f385659ad2/
Changeset:   33f385659ad2
Branch:      master
User:        danwu
Date:        2013-10-24 19:20:09
Summary:     In read_nc unit test, check some tags with double-underscore in the name. It would fail for revisions before commit e7850db (fixed a bug related to stringstream: ss_tag_name.clear() does not empty the string).

Affected #:  1 file

diff --git a/test/io/read_nc.cpp b/test/io/read_nc.cpp
index 0e9adf8..e57c6b3 100644
--- a/test/io/read_nc.cpp
+++ b/test/io/read_nc.cpp
@@ -88,6 +88,17 @@ void test_read_eul_all()
 
   rval = mb.tag_get_handle("COORDS", 3, MB_TYPE_DOUBLE, coordTag);
   CHECK_ERR(rval);
+
+  // Check for some tags with double underscore in the tag name
+  Tag tempTag;
+  rval = mb.tag_get_handle("__lon_LOC_MINMAX", 2, MB_TYPE_INTEGER, tempTag);
+  CHECK_ERR(rval);
+
+  rval = mb.tag_get_handle("__lon_LOC_VALS", 0, MB_TYPE_DOUBLE, tempTag, MB_TAG_VARLEN);
+  CHECK_ERR(rval);
+
+  rval = mb.tag_get_handle("__lon_GLOBAL_MINMAX", 2, MB_TYPE_INTEGER, tempTag);
+  CHECK_ERR(rval);
 }
 
 void test_read_eul_onevar() 
@@ -387,6 +398,17 @@ void test_read_fv_onetimestep()
 
   rval = mb.tag_get_handle("T1", 26, MB_TYPE_DOUBLE, Ttag1);
   CHECK_ERR(rval);
+
+  // Check for some tags with double underscore in the tag name
+  Tag tempTag;
+  rval = mb.tag_get_handle("__lon_LOC_MINMAX", 2, MB_TYPE_INTEGER, tempTag);
+  CHECK_ERR(rval);
+
+  rval = mb.tag_get_handle("__lon_LOC_VALS", 0, MB_TYPE_DOUBLE, tempTag, MB_TAG_VARLEN);
+  CHECK_ERR(rval);
+
+  rval = mb.tag_get_handle("__lon_GLOBAL_MINMAX", 2, MB_TYPE_INTEGER, tempTag);
+  CHECK_ERR(rval);
 }
 
 void test_read_fv_nomesh()

Repository URL: https://bitbucket.org/fathomteam/moab/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the moab-dev mailing list