def test_enum(self):
     strio = StringIO(u"-User:s\nvideo;list;table;text;picture")
     sys.stdin = strio
     text = core.generate('enum')
     print(text)
     strio = StringIO(u"-User:i\nvideo;list;table;text;picture")
     sys.stdin = strio
     text = core.generate('enum')
     print(text)
 def test_const(self):
     strio = StringIO(u"-User\nvideo;list;table;text;picture")
     sys.stdin = strio
     text = core.generate('const')
     print(text)
 def test_enum_v2(self):
     strio = StringIO(u"-ExploreType:i\n curious:评测;news:菜谱;creator:维护;wiki:百科")
     sys.stdin = strio
     text = core.generate('enum')
     print(text)
 def test_viewController(self):
     strio = StringIO(u"-User(m=ProductItem,req,adapter):tc\nauthor[y,l15,w36,a1]:i;bg[t,l,r,b]:i;title(f14,cw);id[x,y](ch):l;url(cwa):b;mobile:f;bgView(cwa):v")
     sys.stdin = strio
     text = core.generate('uicontroller')
     print(text)