#NEWLINE# def test_template_typedef( self ) : #NEWLINE# #INDENT# code = 'class Foo; typedef Bar<Foo*> v;' #NEWLINE# nodes = list ( MakeBuilder ( code ) . generate ( ) ) #NEWLINE# self . assertEqual ( 2 , len ( nodes ) , repr ( nodes ) ) #NEWLINE# self . assertEqual ( Class ( 'Foo' ) , code [ 0 ] ) #NEWLINE# self . assertEqual ( Typedef ( 'v' , alias = [ Type ( 'Bar' , templated_types = [ Type ( 'Foo' , pointer = True ) ] ) ] ) , nodes [ 1 ] )