Commits

Doug Burke committed 92a4335

Fix a failing test on 64-bit GHC (no library change); updated version to 0.8.0.4

  • Participants
  • Parent commits 364209e

Comments (0)

Files changed (2)

 Name:               swish
-Version:            0.8.0.3
+Version:            0.8.0.4
 Stability:          experimental
 License:            LGPL
 License-file:       LICENSE 
   .
   * Complete, ready-to-run, command-line and script-driven programs.
   .
+  Changes in version @0.8.0.4@:
+  .
+  * Fix failing test on 64-bit GHC (no change to the library).
+  .
   Changes in version @0.8.0.3@:
   .
   * Fix up the tests so that they pass with @hashable-1.1.2.5@.

File tests/RDFGraphTest.hs

     testFrConv lbl sVal dtype hVal         
     ]
   
+-- get an integer that is larger than can be stored in an Int
+-- (could just pick a value bigger than maxBound seen on a 64-bit build
+--  but try to be fancy)
+--
+bigInt :: T.Text
+bigInt = let bi :: Integer
+             bi = fromIntegral (maxBound :: Int) + 11
+         in T.pack $ show bi
+
 -- some conversions (e.g. toRDFTriple) are covered by  
 -- other tests
 --
   , testEq "fconv:fail bool2"   (Nothing :: Maybe Bool)  (fromRDFLabel (TypedLit "True" xsdBoolean)) -- should we just let this be valid?
   , testEq "fconv:fail bool3"   (Nothing :: Maybe Bool)  (fromRDFLabel (TypedLit "true" xsdFloat))
   , testEq "fconv:fail int1"    (Nothing :: Maybe Int)  (fromRDFLabel l1)
-  , testEq "fconv:fail int2"    (Nothing :: Maybe Int)  (fromRDFLabel (TypedLit "123456789012345" xsdInteger)) 
+  , testEq "fconv:fail int2"    (Nothing :: Maybe Int)  (fromRDFLabel (TypedLit bigInt xsdInteger)) 
   , testEq "fconv:fail float1"  (Nothing :: Maybe Float)  (fromRDFLabel l1)
   , testEq "fconv:fail float2"  (Nothing :: Maybe Float)  (fromRDFLabel (TypedLit "1.234e101" xsdFloat)) -- invalid input 
   , testEq "fconv:fail float3"  (Nothing :: Maybe Float)  (fromRDFLabel (TypedLit "-1.234e101" xsdFloat)) -- invalid input