Created
April 25, 2017 12:59
-
-
Save achilleas-k/f94818d379d0edda37d57ffce91eed77 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <nix.hpp> | |
int main(){ | |
nix::File file = nix::File::open("append_bug.nix", nix::FileMode::Overwrite); | |
nix::Block bone = file.createBlock("One", "test"); | |
nix::Block btwo = file.createBlock("Two", "test"); | |
nix::DataArray done = bone.createDataArray("DATA", "test", nix::DataType::Double, {1}); | |
nix::DataArray dtwo = btwo.createDataArray("DATA", "test", nix::DataType::Double, {1}); // same name | |
nix::Group grp = bone.createGroup("grp", "test"); | |
// grp.addDataArray(dtwo); // Uncomment to throw error | |
grp.dataArrays({dtwo}); // this should throw error but succeeds | |
std::cout << "dtwo name and id: " << dtwo.name() << ", " << dtwo.id() << std::endl; | |
std::cout << "appended name and id: " << grp.dataArrays()[0].name() << ", " << grp.dataArrays()[0].id() << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment