122 Commits

Author SHA1 Message Date
Tony Zorman
5c7c28060c ci: Drop support for GHC 8.4
Debian stable is not on 8.6, which was always our guide as to which GHC
versions we want to support.

In particular, this lets us get rid of all the quickcheck-classes
special treatment.

Related: 400730fe3b
2022-11-19 09:29:37 +01:00
damhiya
314390937c X.Layout: Don't draw zero-area windows in Tall 2022-11-10 15:52:39 +01:00
Tomas Janousek
79602bfec5 tests: Apply hlint hints 2022-06-25 18:49:02 +01:00
Tomas Janousek
6c5204b91c Simplify quickcheck-classes tests for Stack
We don't need the compat hacks for GHC 8.4.
2021-04-03 17:13:25 +01:00
Tomas Janousek
031bbd6230 Make quickcheck-classes dependency optional 2021-04-03 17:13:25 +01:00
Keith
05e8c204e9 Add quickcheck-classes tests for Stack
The tests are implemented by using a newtype wrapper `TestStack`. This is to
avoid creating `Eq1` and `Show1` instances for `Stack` itself, which are needed
by quickcheck-classes to run with GHC less than 8.5. Tests are automatically
generated by `traversalLaws` and `foldableLaws` using the `Arbitrary` instance
for `TestStack`.
2021-04-03 17:13:25 +01:00
Tomas Janousek
c90df53081 tests: Fix build with GHC 9
Related: https://github.com/xmonad/xmonad/issues/283
2021-03-31 12:00:30 +01:00
Tomáš Janoušek
a90558c07e
Merge pull request #223 from wygulmage/cleanup-tests
deleted unused 'mul' definition in 'prop_aspect_fits'.
2021-01-26 01:15:01 +01:00
slotThe
0aa40480f9 Control.Exception.Extensible -> Control.Exception
According to its documentation[1], this module simply re-exports
Control.Exception on recent GHC versions.  As we only support recent
versions, this import is unnecessary.

[1] http://hackage.haskell.org/package/extensible-exceptions-0.1.1.4/docs/Control-Exception-Extensible.html
2021-01-12 11:57:34 +01:00
Keith
3c6f52a349 deleted unused 'mul' definition in 'prop_aspect_fits'. 2020-05-25 13:03:08 -04:00
Benjamin Danek
21cd920b61
punctuation change 2019-07-10 15:16:24 -07:00
nikolas
1a99280227
typo fix in delete test comment: identiy -> identity 2018-08-31 12:37:04 -04:00
Mikkel Christiansen
f490ced673 Fix failing tests on GHC 8 and reduce warnings.
Fix test failures on GHC 8 for `abort` and `new_abort` caused by `error`
appending the stack trace to the error message (since base
4.9.0.0)[1]. This fixes #36.

An alternative is to use `errorWithoutStackTrace` (new in base 4.9.0.0),
but this then requires use of CPP for backwards compatibility.

Remove type constraints prompting GHC to warn about redundant
constraints.

Tested with 7.6.3, 7.8.4, 7.10.3, 8.0.1 (all on NixOS).

[1] https://hackage.haskell.org/package/base-4.9.0.0/docs/GHC-Stack.html
2016-11-09 12:03:34 +02:00
Adam Vogt
69c5dae00d Avoid using instances removed in QuickCheck-2.7
see https://github.com/nick8325/quickcheck/issues/31 for details
2015-03-01 13:50:49 +00:00
Adam Vogt
f03d2cdf74 make the check for overflow cleaner 2014-05-07 02:49:30 +00:00
Adam Vogt
16c0cb9a33 make cabal test show a FAIL when at least one test fails 2014-05-03 05:46:29 +00:00
Adam Vogt
fbd406eb03 add some more forgotten properties 2014-05-03 03:41:44 +00:00
Adam Vogt
edf3394821 run more tests (and add a couple) 2014-05-03 02:11:03 +00:00
Adam Vogt
f8f53fdff8 add forgotten tests back 2014-05-02 19:28:58 +00:00
Adam Vogt
1da1e2e21e updated hpc 2014-05-02 18:49:04 +00:00
Adam Vogt
8863761d66 update testsuite (mostly due Jesper Reenberg)
* use quickcheck2
* run them using cabal's test-suite field
* split up Properties into separate files
2014-05-02 18:01:46 +00:00
gwern0
32ba0d4a0d loc.hs: hlintify 2010-02-13 23:15:37 +00:00
Adam Vogt
dd22717961 Correct warnings with ghc-6.12
Changes include:
  - compatibility with base-4 or 3 (base-2 untested) by using
    extensible-exceptions. This adds an additional dependency for users of
    ghc<6.10)
  - list all dependencies again when -ftesting (change in Cabal-1.8.0.2)
  - remove unnecessary imports
  - suppress -fwarn-unused-do-bind, with appropriate Cabal-1.8 workaround,
    described here:
    http://www.haskell.org/pipermail/xmonad/2010-January/009554.html
2010-01-18 18:15:32 +00:00
Devin Mullins
74c6dd2721 add W.shiftMaster, fix float/tile-reordering bug 2008-09-11 05:39:09 +00:00
Devin Mullins
5b3eaf663a add currentTag convenience function 2008-05-11 22:42:58 +00:00
Don Stewart
9fd1d4f9d0 more tests 2008-03-23 00:34:36 +00:00
Don Stewart
dbbd934b0b some tests for the size increment handling in Operations.hs 2008-03-22 23:49:52 +00:00
Don Stewart
750544fda9 more properties for splitting horizontally and vertically 2008-03-22 20:18:35 +00:00
Don Stewart
90eae3fd63 test message handling of Full layout 2008-03-22 19:27:28 +00:00
Don Stewart
f8a7d8d381 QuickCheck properties to fully specify the Tall layout, and its messages 2008-03-22 04:18:01 +00:00
Don Stewart
50ce362626 add hpc generation script 2008-03-22 04:16:40 +00:00
Don Stewart
209b88f821 add QuickCheck property for Full: it produces one window, it is fullscreen, and it is the current window 2008-03-22 00:20:26 +00:00
Don Stewart
c5cca485df QC for pureLayout. confirm pureLayout . Tall produces no overlaps 2008-03-22 00:12:29 +00:00
Don Stewart
351de8d2b6 reenable quickcheck properties for layouts (no overlap, fullscreen) 2008-03-21 23:40:15 +00:00
Don Stewart
310c22694e add property for ensureTags behaviour on hidden workspaces 2008-03-10 18:25:57 +00:00
Don Stewart
1a4a4a5000 more general properties for view, greedyView 2008-03-07 18:16:57 +00:00
Don Stewart
d5955b023c bit more code coverage 2008-03-07 18:09:05 +00:00
Don Stewart
4d9a6c2681 more tests. slightly better test coverage 2008-02-27 18:01:13 +00:00
Don Stewart
87193ff61e test geometry setting 2008-02-27 17:55:54 +00:00
Don Stewart
3303c6e05d incorrect invariant test for greedyView 2008-02-25 18:03:50 +00:00
Spencer Janssen
d74814af35 Roll testing into the main executable, use Cabal to build the tests 2008-01-19 09:12:15 +00:00
Spencer Janssen
c3c39aae12 Hierarchify 2007-11-01 18:08:46 +00:00
Spencer Janssen
3789f37f25 This is a massive update, here's what has changed:
* Read is no longer a superclass of Layout
 * All of the core layouts have moved to the new Layouts.hs module
 * Select has been replaced by the new statically typed Choose combinator,
   which is heavily based on David Roundy's NewSelect proposal for
   XMonadContrib.  Consequently:
    - Rather than a list of choosable layouts, we use the ||| combinator to
      combine several layouts into a single switchable layout
    - We've lost the capability to JumpToLayout and PrevLayout.  Both can be
      added with some effort
2007-11-01 06:43:18 +00:00
Brent Yorgey
e384a358b5 Replace 'findIndex' with 'findTag', which more accurately describes what the function does.
I realize this is a big change, but the name 'findIndex' was confusing for me, since I expected it to return some sort of integer.  What it actually does, of course, is return a workspace tag, which might be more general than an index.
Of course, this change breaks several contrib modules; I'll submit a patch to make the change there as well.
2007-10-22 20:41:05 +00:00
Spencer Janssen
01cf4a5581 Whitespace fixes for Properties.hs 2007-10-15 02:27:57 +00:00
Ferenc Wagner
42dde26d4d The empty line isntcomment.
There is a separate filter for that case.
2007-10-06 19:12:31 +00:00
Devin Mullins
1d0191184f add mapWorkspace tests
(just completely duplicated the two mapLayout tests :)
2007-10-06 07:31:29 +00:00
Don Stewart
bab04b71d3 comment out type error'd property 2007-10-06 10:22:25 +00:00
Don Stewart
d83ce46a1e add floating property 2007-10-06 10:06:54 +00:00
Spencer Janssen
42b691d515 Add mapLayout 2007-10-04 23:45:37 +00:00