packages feed

hebrew-time 0.1.0.2 → 0.1.1

raw patch · 3 files changed

+48/−49 lines, 3 filesdep +test-framework-quickcheck2dep −test-framework-quickcheckdep ~QuickCheckdep ~basedep ~time

Dependencies added: test-framework-quickcheck2

Dependencies removed: test-framework-quickcheck

Dependency ranges changed: QuickCheck, base, time

Files

Data/Time/Calendar/Hebrew.hs view
@@ -44,7 +44,7 @@ import Data.Time.Calendar (fromGregorian) import Test.Framework (testGroup, Test) import Test.Framework.Providers.HUnit-import Test.Framework.Providers.QuickCheck (testProperty)+import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.HUnit hiding (Test) import Test.QuickCheck #endif@@ -314,7 +314,7 @@             | isLeapYear (y - 1) == Leap &&               d == 1 &&               (s > 15 ||-               s == 15 && c > 589) = 2+               s == 15 && c > 589) = 1             | otherwise = 0  #if TEST@@ -432,6 +432,10 @@     fromGregorian 1984 9 27 @=? fromHebrew (HebrewDate 5745 Tishrei 1)     fromGregorian 1985 1 12 @=? fromHebrew (HebrewDate 5745 Tevet 19)     fromGregorian 1986 9 8 @=? fromHebrew (HebrewDate 5746 Elul 4)++case_year3932 :: Assertion+case_year3932 = do+    2 @=? dayOfWeek (roshHashana 3932) #endif  clip :: HebrewDate -> HebrewDate@@ -491,6 +495,10 @@         nextAnniversary (HebrewDate 5770 Tishrei 1) (HebrewDate 1 Tishrei 2)     HebrewDate 5771 Tishrei 2 @=?         nextAnniversary (HebrewDate 5770 Tishrei 3) (HebrewDate 1 Tishrei 2)+    HebrewDate 5775 Adar 1 @=?+        nextAnniversary (HebrewDate 5775 Tishrei 1) (HebrewDate 5774 Adar2 1)+    HebrewDate 5775 Cheshvan 29 @=?+        nextAnniversary (HebrewDate 5775 Tishrei 1) (HebrewDate 5774 Cheshvan 30)  ------ testing testSuite :: Test@@ -509,21 +517,19 @@     , testProperty "greg/hebrew same weekday" prop_sameWeekday     , testCase "integral date spot check" case_integralSpotCheck     , testCase "individual date spot checks" case_spotChecks+    , testCase "year 3932" case_year3932     , testCase "caseAnniversaryInYear" caseAnniversaryInYear     , testCase "caseNextAnniversary" caseNextAnniversary     ]  instance Arbitrary Chalakim where-    coarbitrary = undefined     arbitrary = fromIntegral <$> (arbitrary :: Gen Int)  instance Arbitrary Days where-    coarbitrary = undefined     arbitrary = fromIntegral . (+ 1) . (`mod` 353)             <$> (arbitrary :: Gen Int)  instance Arbitrary Years where-    coarbitrary = undefined     arbitrary = fromIntegral . (+ 1) . (`mod` 6000)             <$> (arbitrary :: Gen Int) @@ -531,15 +537,12 @@ enumAll = enumFrom $ toEnum 1  instance Arbitrary YearLeap where-    coarbitrary = undefined     arbitrary = elements enumAll  instance Arbitrary YearType where-    coarbitrary = undefined     arbitrary = elements enumAll  instance Arbitrary HebrewDate where-    coarbitrary = undefined     arbitrary = do         m <- elements [Tishrei, Cheshvan, Kislev, Tevet, Shevat,                        Nissan, Iyar, Sivan, Tammuz, Av, Elul]
LICENSE view
@@ -1,25 +1,20 @@-The following license covers this documentation, and the source code, except-where otherwise indicated.--Copyright 2008, Michael Snoyman. All rights reserved.--Redistribution and use in source and binary forms, with or without-modification, are permitted provided that the following conditions are met:+Copyright (c) 2014 Michael Snoyman -* Redistributions of source code must retain the above copyright notice, this-  list of conditions and the following disclaimer.+Permission is hereby granted, free of charge, to any person obtaining+a copy of this software and associated documentation files (the+"Software"), to deal in the Software without restriction, including+without limitation the rights to use, copy, modify, merge, publish,+distribute, sublicense, and/or sell copies of the Software, and to+permit persons to whom the Software is furnished to do so, subject to+the following conditions: -* Redistributions in binary form must reproduce the above copyright notice,-  this list of conditions and the following disclaimer in the documentation-  and/or other materials provided with the distribution.+The above copyright notice and this permission notice shall be+included in all copies or substantial portions of the Software. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO-EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,-OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
hebrew-time.cabal view
@@ -1,6 +1,6 @@ name:            hebrew-time-version:         0.1.0.2-license:         BSD3+version:         0.1.1+license:         MIT license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com> maintainer:      Michael Snoyman <michael@snoyman.com>@@ -8,30 +8,31 @@ description:     Conversion to and from Hebrew dates. category:        Data stability:       stable-cabal-version:   >= 1.2+cabal-version:   >= 1.10 build-type:      Simple-homepage:        http://github.com/snoyberg/hebrew-time/tree/master--flag buildtests-  description: Build the executable to run unit tests-  default: False+homepage:        https://github.com/snoyberg/hebrew-time  library     build-depends:   base >= 4 && < 5,                      time >= 1.1.3     exposed-modules: Data.Time.Calendar.Hebrew     ghc-options:     -Wall+    default-language: Haskell98 -executable           runtests-    if flag(buildtests)-        Buildable: True-        cpp-options:     -DTEST-        build-depends:   test-framework,-                         test-framework-quickcheck,-                         test-framework-hunit,-                         HUnit,-                         QuickCheck >= 1 && < 2-    else-        Buildable: False+test-suite runtests+    type: exitcode-stdio-1.0+    default-language: Haskell98+    cpp-options:     -DTEST+    build-depends:   test-framework,+                     test-framework-quickcheck2,+                     test-framework-hunit,+                     HUnit,+                     base,+                     time,+                     QuickCheck >= 2 && < 3     ghc-options:     -Wall     main-is:         runtests.hs++source-repository head+  type:     git+  location: git://github.com/snoyberg/hebrew-time.git