Mercurial > hg > orthanc-stone
diff Resources/CodeGeneration/stonegentool_test.py @ 627:b7fd0471281c am-dev
fix CodeGeneration unit tests
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 08 May 2019 10:51:41 +0200 |
parents | 1dbf2d9ed1e4 |
children | 84af39146e76 |
line wrap: on
line diff
--- a/Resources/CodeGeneration/stonegentool_test.py Tue May 07 11:15:57 2019 +0200 +++ b/Resources/CodeGeneration/stonegentool_test.py Wed May 08 10:51:41 2019 +0200 @@ -131,6 +131,7 @@ self.assertDictEqual(message1Struct, { 'name':'Message1', + '__meta__': {'handleInCpp': False, 'handleInTypescript': False}, 'fields': { 'a': 'int32', 'b': 'string', @@ -164,6 +165,12 @@ Barbecue, }; + export enum EnumMonth0 { + January, + February, + March, + }; + """ self.assertEqual(renderedCodeRef,renderedCode) @@ -192,6 +199,12 @@ Barbecue, }; + enum EnumMonth0 { + January, + February, + March, + }; + """ self.assertEqual(renderedCodeRef,renderedCode) @@ -278,9 +291,9 @@ movies:Array<MovieType>; constructor() { - someStrings = new Array<string>(); - someInts2 = new Array<number>(); - movies = new Array<MovieType>(); + this.someStrings = new Array<string>(); + this.someInts2 = new Array<number>(); + this.movies = new Array<MovieType>(); } public StoneSerialize(): string { @@ -296,8 +309,8 @@ someInts:Array<number>; constructor() { - someAs = new Array<A>(); - someInts = new Array<number>(); + this.someAs = new Array<A>(); + this.someInts = new Array<number>(); } public StoneSerialize(): string { @@ -313,8 +326,8 @@ ddd:Array<string>; constructor() { - someBs = new Array<B>(); - ddd = new Array<string>(); + this.someBs = new Array<B>(); + this.ddd = new Array<string>(); } public StoneSerialize(): string { @@ -332,10 +345,10 @@ d:boolean; constructor() { - a = new number(); - b = new string(); - c = new EnumMonth0(); - d = new boolean(); + this.a = new number(); + this.b = new string(); + this.c = new EnumMonth0(); + this.d = new boolean(); } public StoneSerialize(): string { @@ -352,13 +365,15 @@ tutu:Array<string>; titi:Map<string, string>; lulu:Map<string, Message1>; + movieType:MovieType; constructor() { - toto = new string(); - tata = new Array<Message1>(); - tutu = new Array<string>(); - titi = new Map<string, string>(); - lulu = new Map<string, Message1>(); + this.toto = new string(); + this.tata = new Array<Message1>(); + this.tutu = new Array<string>(); + this.titi = new Map<string, string>(); + this.lulu = new Map<string, Message1>(); + this.movieType = new MovieType(); } public StoneSerialize(): string {