Skip to content

Commit

Permalink
make matrix vector meta example tests work for csharp
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Jul 18, 2016
1 parent 9e099d8 commit 39003f0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
24 changes: 23 additions & 1 deletion examples/meta/generator/targets/csharp.json
Expand Up @@ -4,7 +4,29 @@
"Comment": "//$comment\n",
"Init": {
"Construct": "$typeName $name = new $typeName($arguments)",
"Copy": "$typeName $name = $expr"
"Copy": "$typeName $name = $expr",
"BoolVector": "var $name = new bool[$arguments]",
"CharVector": "var $name = new char[$arguments]",
"ByteVector": "var $name = new byte[$arguments]",
"WordVector": "var $name = new ushort[$arguments]",
"IntVector": "var $name = new int[$arguments]",
"LongIntVector": "var $name = new long[$arguments]",
"ULongIntVector": "var $name = new ulongint[$arguments]",
"ShortRealVector": "var $name = new float[$arguments]",
"RealVector": "var $name = new double[$arguments]",
"LongRealVector": "var $name = new double[$arguments]",
"ComplexVector": "var $name = new Complex[$arguments]",
"BoolMatrix": "var $name = new bool[$arguments]",
"CharMatrix": "var $name = new char[$arguments]",
"ByteMatrix": "var $name = new byte[$arguments]",
"WordMatrix": "var $name = new ushort[$arguments]",
"IntMatrix": "var $name = new int[$arguments]",
"LongIntMatrix": "var $name = new long[$arguments]",
"ULongIntMatrix": "var $name = new ulongint[$arguments]",
"ShortRealMatrix": "var $name = new float[$arguments]",
"RealMatrix": "var $name = new double[$arguments]",
"LongRealMatrix": "var $name = new double[$arguments]",
"ComplexMatrix": "var $name = new Complex[$arguments]"
},
"Assign": "$lhs = $expr",
"Type": {
Expand Down
4 changes: 2 additions & 2 deletions examples/meta/src/tests/matrix_types.sg
Expand Up @@ -19,8 +19,8 @@ long_int_matrix[0,0]=0
long_int_matrix[1,0]=1

ShortRealMatrix short_real_matrix(2,1)
short_real_matrix[0,0]=0.1
short_real_matrix[1,0]=1.1
short_real_matrix[0,0]=0
short_real_matrix[1,0]=1

RealMatrix real_matrix(2,1)
real_matrix[0,0]=0.1
Expand Down
4 changes: 2 additions & 2 deletions examples/meta/src/tests/vector_types.sg
Expand Up @@ -19,8 +19,8 @@ long_int_vector[0]=0
long_int_vector[1]=1

ShortRealVector short_real_vector(2)
short_real_vector[0]=0.1
short_real_vector[1]=1.1
short_real_vector[0]=0
short_real_vector[1]=1

RealVector real_vector(2)
real_vector[0]=0.1
Expand Down

0 comments on commit 39003f0

Please sign in to comment.