Mercurial > hg > Database > jungle-sharp
diff src/test/csharp/jp.ac.u-ryukyu.ie.cr/junge-main/jungle/core/nodeeditor/PutAttributeTest.cs @ 17:01a08cf4b2d9
Liq Files
author | Kazuma |
---|---|
date | Mon, 07 Nov 2016 01:05:24 +0900 |
parents | b71d9ea6bd8e |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/csharp/jp.ac.u-ryukyu.ie.cr/junge-main/jungle/core/nodeeditor/PutAttributeTest.cs Mon Nov 07 01:05:24 2016 +0900 @@ -0,0 +1,28 @@ +using UnityEngine; +using System.Collections; + +public class PutAttributeTest : MonoBehaviour { + + string key = "hoge"; + public byte[] value; + + // Use this for initialization + void Start () { + TreeNode node = new DefaultTreeNode (); + PutAttribute op = new PutAttribute (key, value); + + Either<Error, LoggingNode> either = op.edit (node); + if (either.isA ()) { + Debug.Log ("Error発生"); + } + LoggingNode newnode = either.b (); + Debug.Log (newnode); + byte[] ret = newnode.getAttributes ().get (key); + Debug.Log ("insertしたものは" + ret); + } + + // Update is called once per frame + void Update () { + + } +}