From 55d3f65e6a705f863a3b7f3f9476bd585c37378e Mon Sep 17 00:00:00 2001 From: Alban D Date: Mon, 29 Apr 2013 22:52:18 +0200 Subject: [PATCH] Test cases for rand() and random() Updates #6. --- testapp/CryptoTester.h | 1 + testapp/CryptoTester.m | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/testapp/CryptoTester.h b/testapp/CryptoTester.h index cac08e4..6ec4857 100644 --- a/testapp/CryptoTester.h +++ b/testapp/CryptoTester.h @@ -5,6 +5,7 @@ + (void)runAllTests; + (void) testCommonHmac; ++ (void) testRand; + (void) testCommonDigest; + (void) testCommonCryptor; + (void) testCommonKeyDerivation; diff --git a/testapp/CryptoTester.m b/testapp/CryptoTester.m index 572736e..0d2fdea 100644 --- a/testapp/CryptoTester.m +++ b/testapp/CryptoTester.m @@ -16,6 +16,7 @@ @implementation CryptoTester + (void)runAllTests { [self testCommonHmac]; + [self testRand]; [self testCommonDigest]; [self testCommonCryptor]; [self testCommonKeyDerivation]; @@ -34,6 +35,12 @@ + (void) testCommonHmac { } ++ (void) testRand { + rand(); + random(); +} + + + (void) testCommonDigest { CC_MD5_CTX ctx; unsigned char dataOut[CC_MD5_DIGEST_LENGTH];