Ejemplo n.º 1
0
def test_no_model():
    strio = StringIO(u"""
    loveMe:b;count:i;name:s;created:d;avatar
    """)
    sys.stdin = strio
    text = generators.generate_v2('settings')
    print(text)
Ejemplo n.º 2
0
def test_viewModel():
    strio = StringIO(
        u"-UserTableViewCell(m=User):tc\nauthor[y,l15,w36,a1](tint=ca):i;bg[e0]:i;title[bl8@author](f14,cw,text=我的);id[x,y](ch):l;url(cwa):b;mobile:f;bgView(cwa):v"
    )
    sys.stdin = strio
    output = generate_v2("view")
    print(output)
Ejemplo n.º 3
0
def test_settings():
    strio = StringIO(u"""
    -AppUserDefaults(sync_on_save=true,prefix=app)
    loveMe:b;count:i;name:s;created:d;avatar
    """)
    sys.stdin = strio
    text = generators.generate_v2('settings')
    print(text)
Ejemplo n.º 4
0
def test_emptyView():
    strio = StringIO(u"""
    EmptyView:v
    refresh[hor0,bl16@desc,h36](f17,cpt):b
    """)
    sys.stdin = strio
    output = generate_v2("view")
    print(output)
def test_sadapter():
    strio = StringIO(u'''
    DiscoverViewController(sadapter):tvc
    name:ltc
    area:rdc
    ''')
    sys.stdin = strio
    output = generate_v2("controller")
    print(output)
def test_controller():
    strio = StringIO(u'''
    DiscoverViewController(m=DiscoverItem,req,adapter=c,page,init_views=false,search_ui,right_button=完成):vc
    slide[t0,hor0,h180]
    _[hor0,t0,b0]:c
    ''')
    sys.stdin = strio
    output = generate_v2("controller")
    print(output)
Ejemplo n.º 7
0
def test_controller():
    strio = StringIO(u'''
    -DiscoverViewController(m=DiscoverItem,req,adapter=c,page):vc
    slide[t0,hor0,h180]
    _[hor0,t0,b0]:c
    ''')
    sys.stdin = strio
    output = generate_v2("controller")
    print(output)
Ejemplo n.º 8
0
def test_goodsCell():
    strio = StringIO(u"""
    GoodsCell(m=Goods):tc
    icon[y, w64, a1, l15]:i
    title[t0@icon, at15@icon](f17, cpt)
    desc[bl4@title, l0@title](f13, cst)
    fee[t0@title, r15](cw, f15):il
    """)
    sys.stdin = strio
    output = generate_v2("view")
    print(output)
Ejemplo n.º 9
0
def test_fontConfig():
    strio = StringIO(u"-UserTableViewCell(m=User):tc\ntitle(f14,cw,text=我的)")
    sys.stdin = strio
    output = generate_v2("view")
    print(output)