コード例 #1
0
 public CloseReopenTransactionBuilder WithType(Type.Kind kind)
 {
     if (!(kind == Type.Kind.CloseAccount || kind == Type.Kind.ReopenAccount))
     {
         throw new ArgumentException($"Only {Type.Kind.CloseAccount} or {Type.Kind.ReopenAccount} supported. Was {kind}");
     }
     _type = new Type(kind);
     return(this);
 }
コード例 #2
0
        public void testGetAST(string code, CursorKind fstChildKind, string fstChildSpelling, Type.Kind fstChildTypeKind)
        {
            Cursor root = getWrapper(code).getRoot();

            Assert.AreEqual(CursorKind.TranslationUnit, root.Kind);
            Assert.AreEqual(fstChildKind, root.Children[0].Kind);
            Assert.AreEqual(fstChildSpelling, root.Children[0].Spelling);
            Assert.AreEqual(fstChildTypeKind, root.Children[0].ResultType.TypeKind);
        }