@@ -25,12 +25,12 @@ class TableSchemaParserSuite extends SparkFunSuite {
2525 def parse (sql : String ): StructType = CatalystSqlParser .parseTableSchema(sql)
2626
2727 def checkTableSchema (tableSchemaString : String , expectedDataType : DataType ): Unit = {
28- test(s " parse ${ tableSchemaString.replace( " \n " , " " )} " ) {
28+ test(s " parse $tableSchemaString" ) {
2929 assert(parse(tableSchemaString) === expectedDataType)
3030 }
3131 }
3232
33- def intercept (sql : String ): Unit =
33+ def assertError (sql : String ): Unit =
3434 intercept[ParseException ](CatalystSqlParser .parseTableSchema(sql))
3535
3636 checkTableSchema(" a int" , new StructType ().add(" a" , " int" ))
@@ -79,10 +79,10 @@ class TableSchemaParserSuite extends SparkFunSuite {
7979 }
8080
8181 // Negative cases
82- intercept (" " )
83- intercept (" a" )
84- intercept (" a INT b long" )
85- intercept (" a INT,, b long" )
86- intercept (" a INT, b long,," )
87- intercept (" a INT, b long, c int," )
82+ assertError (" " )
83+ assertError (" a" )
84+ assertError (" a INT b long" )
85+ assertError (" a INT,, b long" )
86+ assertError (" a INT, b long,," )
87+ assertError (" a INT, b long, c int," )
8888}
0 commit comments