mirror of https://github.com/status-im/qzxing.git
fixed linker error for QZXingTests when compiled with MSVC. Minor styling edits in TestCase.cpp
This commit is contained in:
parent
fe26b2112e
commit
3397ee4a2b
|
@ -25,12 +25,12 @@ SOURCES += main.cpp \
|
|||
DecodeValidator.cpp \
|
||||
ValidationStats.cpp \
|
||||
EncodeValidator.cpp \
|
||||
TestCase.cpp \
|
||||
zxing/qrcode/encoder/MatrixUtilTests.cpp \
|
||||
zxing/qrcode/encoder/MaskUtilTests.cpp \
|
||||
zxing/qrcode/encoder/BitArrayTests.cpp \
|
||||
zxing/qrcode/encoder/QRCodeTests.cpp \
|
||||
zxing/qrcode/encoder/EncoderTests.cpp \
|
||||
zxing/common/reedsolomon/ReedSolomonEncoderTests.cpp \
|
||||
TestCase.cpp
|
||||
zxing/common/reedsolomon/ReedSolomonEncoderTests.cpp
|
||||
|
||||
include(../../../src/QZXing.pri)
|
||||
|
|
|
@ -2,12 +2,16 @@
|
|||
#include <stdlib.h> /* srand, rand */
|
||||
#include <time.h> /* time */
|
||||
|
||||
void zxing::TestCase::initializeRandom()
|
||||
namespace zxing{
|
||||
|
||||
void TestCase::initializeRandom()
|
||||
{
|
||||
srand(time(NULL));
|
||||
}
|
||||
|
||||
int zxing::TestCase::generateRandomNumber(int range)
|
||||
int TestCase::generateRandomNumber(int range)
|
||||
{
|
||||
return rand() % range;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue