File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ namespace Mustachio.Tests
99{
1010 public class TemplateFixture
1111 {
12-
12+
1313 [ Fact ]
1414 public void TemplateRendersContentWithNoVariables ( )
1515 {
@@ -71,6 +71,17 @@ public void NegationGroupRendersContentWhenValueNotSet()
7171 Assert . Equal ( "No Stuff Here." , rendered ) ;
7272 }
7373
74+ [ Fact ]
75+ public void UnsignedIntegralTypeModelVariablesAreSupported ( )
76+ {
77+ var model = new Dictionary < string , object > ( ) {
78+ { "uint" , ( uint ) 123 } ,
79+ { "ushort" , ( ushort ) 234 } ,
80+ { "ulong" , ( ulong ) 18446744073709551615 } // max ulong
81+ } ;
82+
83+ Assert . Equal ( "123;234;18446744073709551615" , Parser . Parse ( "{{uint}};{{ushort}};{{ulong}}" ) ( model ) ) ;
84+ }
7485
7586 [ Fact ]
7687 public void TemplateRendersWithComplextEachPath ( )
Original file line number Diff line number Diff line change @@ -100,6 +100,9 @@ public bool Exists()
100100 typeof ( byte ) ,
101101 typeof ( sbyte ) ,
102102 typeof ( decimal ) ,
103+ typeof ( uint ) ,
104+ typeof ( ushort ) ,
105+ typeof ( ulong ) ,
103106 typeof ( int ? ) ,
104107 typeof ( bool ? ) ,
105108 typeof ( double ? ) ,
@@ -109,7 +112,10 @@ public bool Exists()
109112 typeof ( long ? ) ,
110113 typeof ( byte ? ) ,
111114 typeof ( sbyte ? ) ,
112- typeof ( decimal ? )
115+ typeof ( decimal ? ) ,
116+ typeof ( uint ? ) ,
117+ typeof ( ushort ? ) ,
118+ typeof ( ulong ? )
113119 } ;
114120
115121 public override string ToString ( )
You can’t perform that action at this time.
0 commit comments