On Fri, Jul 04, 2014 at 01:18:00PM +0200, 'Petr Pudlak' via ganeti-devel wrote:
> This will allow to replace the implementation later, if we need more
> complex operations on IP addresses, add IPv6 etc.
> (Package 'iproute' would be a good candidate.)
> 
> Signed-off-by: Petr Pudlak <[email protected]>
> ---
>  src/Ganeti/Objects.hs          | 65 
> ++++++++++++++++++++++++++++--------------
>  src/Ganeti/Query/Network.hs    |  4 +--
>  test/hs/Test/Ganeti/Objects.hs | 27 ++++++++++--------
>  3 files changed, 60 insertions(+), 36 deletions(-)

>  -- | Tests that any difference between IPv4 consecutive addresses is 1.
> -prop_nextIp4Address :: Ip4Address -> Property
> -prop_nextIp4Address ip4 =
> -  ip4AddrValue (nextIp4Address ip4) ==? ip4AddrValue ip4 + 1
> +prop_ip4AddressFromNumber :: Property
> +prop_ip4AddressFromNumber =
> +  ip4AddressToNumber <$> readIp4Address "1.2.3.4" ==? Just 0x01020304

Here, the new test has the description of the removed test, which is
highly confusing as something different is tested. Please update. Also,
how valuable is a test on a single value?

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores

Reply via email to