mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-13 16:09:04 +08:00
unittest: Add missing precision specifiers (CID 1402752)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
95733433d9
commit
bdad068686
@ -84,13 +84,13 @@ TEST_F(ScanutilsTest, DoesScanf) {
|
||||
EXPECT_STREQ(s1, s2);
|
||||
EXPECT_EQ(20, strlen(s2));
|
||||
// Now read the rest of the alphabet.
|
||||
r1 = fscanf(fp1, "%s", s1);
|
||||
r2 = tfscanf(fp2, "%s", s2);
|
||||
r1 = fscanf(fp1, "%1023s", s1);
|
||||
r2 = tfscanf(fp2, "%1023s", s2);
|
||||
EXPECT_EQ(r1, r2);
|
||||
EXPECT_STREQ(s1, s2);
|
||||
EXPECT_EQ(6, strlen(s2));
|
||||
r1 = fscanf(fp1, "%s", s1);
|
||||
r2 = tfscanf(fp2, "%s", s2);
|
||||
r1 = fscanf(fp1, "%1023s", s1);
|
||||
r2 = tfscanf(fp2, "%1023s", s2);
|
||||
EXPECT_EQ(r1, r2);
|
||||
EXPECT_STREQ(s1, s2);
|
||||
EXPECT_EQ(2, strlen(s2));
|
||||
@ -104,8 +104,8 @@ TEST_F(ScanutilsTest, DoesScanf) {
|
||||
EXPECT_EQ(r1, r2);
|
||||
EXPECT_EQ(i1[0], i2[0]);
|
||||
// We should still see the next value and no phantoms.
|
||||
r1 = fscanf(fp1, "%d %s", &i1[0], s1);
|
||||
r2 = tfscanf(fp2, "%d %s", &i2[0], s2);
|
||||
r1 = fscanf(fp1, "%d %1023s", &i1[0], s1);
|
||||
r2 = tfscanf(fp2, "%d %1023s", &i2[0], s2);
|
||||
EXPECT_EQ(r1, r2);
|
||||
EXPECT_EQ(1, r2);
|
||||
EXPECT_EQ(i1[0], i2[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user