-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Storage is still uncopyable. But I give Storage the ability to create a default JSON object. Here is an example: Storage has_JObj; ///< this will create a default JSON object EXPECT_TRUE(has_JObj.isValid()); Storage has_no_JObj(Storage::Empty); ///< it's waiting for read/open EXPECT_FALSE(has_JObj.isValid()); has_no_JObj.read("{ }");
- Loading branch information
Showing
8 changed files
with
76 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//===- StorageTest.cpp ----------------------------------------------------===// | ||
// | ||
// The ONNC Project | ||
// | ||
// See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
#include <skypat/skypat.h> | ||
#include <onnc/JSON/Storage.h> | ||
#include <onnc/JSON/Group.h> | ||
#include <onnc/Support/IOStream.h> | ||
|
||
using namespace onnc; | ||
|
||
//===----------------------------------------------------------------------===// | ||
// Storage Test | ||
//===----------------------------------------------------------------------===// | ||
SKYPAT_F(GroupTest, constructor) | ||
{ | ||
json::Group group; | ||
EXPECT_TRUE(group.isNull()); | ||
|
||
json::Storage storage; | ||
json::Group g1 = storage.addGroup("group 1"); | ||
outs() << storage << std::endl; | ||
// group = g1; | ||
// EXPECT_FALSE(group.isNull()); | ||
// EXPECT_TRUE(group.isEmpty()); | ||
} |