[Groonga-commit] groonga/groonga [master] test: raise runtime error when parsing failed

Zurück zum Archiv-Index

null+****@clear***** null+****@clear*****
2012年 6月 4日 (月) 12:01:56 JST


HAYASHI Kentaro	2012-06-04 12:01:56 +0900 (Mon, 04 Jun 2012)

  New Revision: 355771039300ce1d7688c0ad5f2615494a4bebc8

  Log:
    test: raise runtime error when parsing failed

  Modified files:
    test/function/tools/geo/generate-grntest-data.rb

  Modified: test/function/tools/geo/generate-grntest-data.rb (+6 -0)
===================================================================
--- test/function/tools/geo/generate-grntest-data.rb    2012-06-04 11:55:54 +0900 (6acd935)
+++ test/function/tools/geo/generate-grntest-data.rb    2012-06-04 12:01:56 +0900 (1925b97)
@@ -665,15 +665,21 @@ class GrnTestData
           if start_degree =~ /longitude (.+) latitude (.+)/
             @longitude_start_degree = $1.to_i
             @latitude_start_degree = $2.to_i
+          else
+            raise "failed to parse start point data"
           end
           if end_degree =~ /longitude (.+) latitude (.+)/
             @longitude_end_degree = $1.to_i
             @latitude_end_degree = $2.to_i
+          else
+            raise "failed to parse end point data"
           end
           @longitude_start = @longitude_start_degree * GRN_GEO_RESOLUTION
           @longitude_end = @longitude_end_degree * GRN_GEO_RESOLUTION
           @latitude_start = @latitude_start_degree * GRN_GEO_RESOLUTION
           @latitude_end = @latitude_end_degree * GRN_GEO_RESOLUTION
+        else
+          raise "failed to parse comment parts"
         end
       end
     end




Groonga-commit メーリングリストの案内
Zurück zum Archiv-Index