Revision 72747d91 test/hs/Test/Ganeti/OpCodes.hs
b/test/hs/Test/Ganeti/OpCodes.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 |
... | ... | |
440 | 440 |
case_py_compat_types :: HUnit.Assertion |
441 | 441 |
case_py_compat_types = do |
442 | 442 |
let num_opcodes = length OpCodes.allOpIDs * 100 |
443 |
sample_opcodes <- sample' (vectorOf num_opcodes |
|
444 |
(arbitrary::Gen OpCodes.MetaOpCode)) |
|
445 |
let opcodes = head sample_opcodes |
|
446 |
with_sum = map (\o -> (OpCodes.opSummary $ |
|
443 |
opcodes <- genSample (vectorOf num_opcodes |
|
444 |
(arbitrary::Gen OpCodes.MetaOpCode)) |
|
445 |
let with_sum = map (\o -> (OpCodes.opSummary $ |
|
447 | 446 |
OpCodes.metaOpCode o, o)) opcodes |
448 | 447 |
serialized = J.encode opcodes |
449 | 448 |
-- check for non-ASCII fields, usually due to 'arbitrary :: String' |
Also available in: Unified diff