@@ -214,8 +214,33 @@ suite.addBatch({
214214 'should have correct level' : function ( err , lintError ) {
215215 assert . equal ( lintError . level , '5' ) ;
216216 }
217- }
217+ } ,
218218
219+ 'build/c++11 (5)' : {
220+ topic : function ( ) {
221+ var error = new LintError ( 'src/channel.cpp:1: <future> is an unapproved C++11 header. [build/c++11] [5]' ) ;
222+ this . callback ( null , error ) ;
223+ } ,
224+ 'should have correct filename' : function ( err , lintError ) {
225+ assert . equal ( lintError . file , 'src/channel.cpp' ) ;
226+ } ,
227+ 'should have correct line number' : function ( err , lintError ) {
228+ assert . equal ( lintError . linenumber , '1' ) ;
229+ } ,
230+ 'should have correct reason' : function ( err , lintError ) {
231+ console . log ( lintError ) ;
232+ assert . equal ( lintError . reason , '<future> is an unapproved C++11 header.' ) ;
233+ } ,
234+ 'should have correct category' : function ( err , lintError ) {
235+ assert . equal ( lintError . category , 'build' ) ;
236+ } ,
237+ 'should have correct sub-category' : function ( err , lintError ) {
238+ assert . equal ( lintError . sub_category , 'c++11' ) ;
239+ } ,
240+ 'should have correct level' : function ( err , lintError ) {
241+ assert . equal ( lintError . level , '5' ) ;
242+ }
243+ }
219244} ) ;
220245
221246suite . export ( module ) ;
0 commit comments