@@ -30,69 +30,6 @@ public void ConstructorExceptions ()
30
30
Assert . AreEqual ( 4200 , e . Code ) ;
31
31
}
32
32
33
- [ Test ]
34
- public void GenerateInParallel ( )
35
- {
36
- var assemblyDef = AssemblyDefinition . ReadAssembly ( typeof ( DefaultName ) . Assembly . Location ) ;
37
- var types = new [ ] {
38
- typeof ( AbstractClassInvoker ) ,
39
- typeof ( AbstractClass ) ,
40
- typeof ( ActivityName ) ,
41
- typeof ( ApplicationName ) ,
42
- typeof ( DefaultName ) ,
43
- typeof ( DefaultName . A ) ,
44
- typeof ( DefaultName . A . B ) ,
45
- typeof ( DefaultName . C . D ) ,
46
- // Skip because this will produce nested types
47
- // typeof (ExampleOuterClass),
48
- // typeof (ExampleOuterClass.ExampleInnerClass),
49
- typeof ( InstrumentationName ) ,
50
- // Skip because this will produce nested types
51
- // typeof (NonStaticOuterClass),
52
- // typeof (NonStaticOuterClass.NonStaticInnerClass),
53
- typeof ( ProviderName ) ,
54
- typeof ( ReceiverName ) ,
55
- typeof ( RegisterName ) ,
56
- typeof ( RegisterName . DefaultNestedName ) ,
57
- typeof ( RegisterName . OverrideNestedName ) ,
58
- typeof ( ServiceName ) ,
59
- } ;
60
- var typeDefs = types . Select ( t => SupportDeclarations . GetTypeDefinition ( t , assemblyDef ) )
61
- . ToList ( ) ;
62
-
63
- var tasks = typeDefs . Select ( type => Task . Run ( ( ) => {
64
- var g = new JavaCallableWrapperGenerator ( type , log : Console . WriteLine ) ;
65
- var o = new StringWriter ( ) ;
66
- g . Generate ( o ) ;
67
- var r = new StringReader ( o . ToString ( ) ) ;
68
- var l = r . ReadLine ( ) ;
69
- if ( ! l . StartsWith ( "package " , StringComparison . Ordinal ) )
70
- throw new InvalidOperationException ( $ "Invalid JCW for { type . FullName } !") ;
71
- var p = l . Substring ( "package " . Length ) ;
72
- p = p . Substring ( 0 , p . Length - 1 ) ;
73
- l = r . ReadLine ( ) ;
74
- if ( l . Length != 0 )
75
- throw new InvalidOperationException ( $ "Invalid JCW for { type . FullName } ! (Missing newline)") ;
76
- l = r . ReadLine ( ) ;
77
- if ( l . Length != 0 )
78
- throw new InvalidOperationException ( $ "Invalid JCW for { type . FullName } ! (Missing 2nd newline)") ;
79
- l = r . ReadLine ( ) ;
80
- string c = null ;
81
- if ( l . StartsWith ( "public class " , StringComparison . Ordinal ) )
82
- c = l . Substring ( "public class " . Length ) ;
83
- else if ( l . StartsWith ( "public abstract class " , StringComparison . Ordinal ) )
84
- c = l . Substring ( "public abstract class " . Length ) ;
85
- else
86
- throw new InvalidOperationException ( $ "Invalid JCW for { type . FullName } ! (Missing class)") ;
87
- return p + "/" + c ;
88
- } ) ) . ToArray ( ) ;
89
- Task . WaitAll ( tasks ) ;
90
- for ( int i = 0 ; i < types . Length ; ++ i ) {
91
- Assert . AreEqual ( JniType . ToJniName ( typeDefs [ i ] ) , tasks [ i ] . Result ) ;
92
- Assert . AreEqual ( JniType . ToJniName ( types [ i ] ) , tasks [ i ] . Result ) ;
93
- }
94
- }
95
-
96
33
[ Test ]
97
34
public void GenerateApplication (
98
35
[ Values ( null , "android.app.Application" , "android.support.multidex.MultiDexApplication" ) ] string applicationJavaClass
0 commit comments