Revision 45566243 test/hs/Test/Ganeti/Utils.hs
b/test/hs/Test/Ganeti/Utils.hs | ||
---|---|---|
7 | 7 |
|
8 | 8 |
{- |
9 | 9 |
|
10 |
Copyright (C) 2009, 2010, 2011, 2012 Google Inc. |
|
10 |
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
|
|
11 | 11 |
|
12 | 12 |
This program is free software; you can redistribute it and/or modify |
13 | 13 |
it under the terms of the GNU General Public License as published by |
... | ... | |
162 | 162 |
"cPRi0lM7HLnSuWA2G9", "KVQqLPDjcPjf8T3oyzjcOsfkb", |
163 | 163 |
"guKJkXnkULealVC8CyF1xefym", "pqF8dkU5B1cMnyZuREaSOADYx"] |
164 | 164 |
|
165 |
-- | Tests single-string behaviour of 'niceSort'. Last test is special |
|
166 |
-- in the sense that /0/ is before any other non-empty string (except |
|
167 |
-- itself, etc.). |
|
165 |
-- | Tests single-string behaviour of 'niceSort'. |
|
168 | 166 |
prop_niceSort_single :: Property |
169 | 167 |
prop_niceSort_single = |
170 | 168 |
forAll genName $ \name -> |
171 | 169 |
conjoin |
172 | 170 |
[ printTestCase "single string" $ [name] ==? niceSort [name] |
173 | 171 |
, printTestCase "single plus empty" $ ["", name] ==? niceSort [name, ""] |
174 |
, printTestCase "single plus 0-digit" $ ["0", name] ==? niceSort [name, "0"] |
|
175 | 172 |
] |
176 | 173 |
|
177 | 174 |
-- | Tests some generic 'niceSort' properties. Note that the last test |
Also available in: Unified diff