Permalink
Browse files

Harder unittest that uses file i/o and string manipulation

  • Loading branch information...
theraysmith committed Aug 3, 2017
1 parent 4572940 commit 8e55e52be749b3faccca8ae41abdc0e3d3c7f887
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,112 @@
111
NULL 0 NULL 0
I 5 59,68,216,255,10,155,0,50,29,173 Latin 7 0 1 I # I [49 ]A
' 10 148,225,216,255,11,51,0,97,36,173 Common 2 10 2 ' # ' [27 ]p
v 3 59,68,187,197,84,173,0,32,84,218 Latin 61 0 3 v # v [76 ]a
e 3 58,64,189,200,87,154,0,32,98,188 Latin 88 0 4 e # e [65 ]a
J 5 0,64,216,255,39,242,0,30,62,234 Latin 79 0 5 J # J [4a ]A
o 3 58,66,188,200,87,151,0,32,98,185 Latin 83 0 6 o # o [6f ]a
i 3 59,69,216,255,11,141,0,54,27,173 Latin 1 0 7 i # i [69 ]a
n 3 59,68,188,202,87,187,0,25,101,208 Latin 45 0 8 n # n [6e ]a
| 0 0,67,216,255,8,73,0,80,50,173 Common 9 10 9 | # | [7c ]
- 10 105,161,122,175,49,176,0,43,56,215 Common 10 3 10 - # - [2d ]p
S 5 57,64,219,255,87,174,0,30,100,200 Latin 26 0 11 S # S [53 ]A
z 3 46,68,186,199,65,151,0,32,68,173 Latin 95 0 12 z # z [7a ]a
: 10 58,85,141,221,11,69,0,67,38,173 Common 13 6 13 : # : [3a ]p
# 10 37,84,200,255,99,221,0,41,109,266 Common 14 4 14 # # # [23 ]p
6 8 58,66,219,255,87,156,0,54,104,173 Common 15 2 15 6 # 6 [36 ]0
% 10 27,67,205,255,105,257,0,49,117,288 Common 16 4 16 % # % [25 ]p
5 8 12,66,199,255,82,160,0,36,103,173 Common 17 2 17 5 # 5 [35 ]0
0 8 58,66,187,255,88,164,0,45,103,180 Common 18 2 18 0 # 0 [30 ]0
@ 10 0,65,211,255,99,286,0,39,117,291 Common 19 10 19 @ # @ [40 ]p
p 3 0,47,192,226,87,180,0,25,100,200 Latin 68 0 20 p # p [70 ]a
a 3 58,65,186,200,85,164,0,26,97,185 Latin 67 0 21 a # a [61 ]a
r 3 59,68,186,202,58,173,0,40,69,180 Latin 40 0 22 r # r [72 ]a
m 3 56,68,189,202,108,280,0,25,117,306 Latin 38 0 23 m # m [6d ]a
F 5 57,68,216,255,68,210,0,31,77,209 Latin 29 0 24 F # F [46 ]A
u 3 57,65,187,202,85,184,0,39,100,208 Latin 85 0 25 u # u [75 ]a
s 3 58,65,192,200,78,147,0,30,91,173 Latin 11 0 26 s # s [73 ]a
B 5 62,68,216,255,91,227,0,27,106,227 Latin 46 0 27 B # B [42 ]A
» 10 0,133,146,235,63,284,0,32,71,294 Common 28 10 49 » # » [bb ]p
f 3 0,68,216,255,54,175,0,42,55,193 Latin 24 0 29 f # f [66 ]a
d 3 57,65,216,255,88,174,0,28,100,200 Latin 59 0 30 d # d [64 ]a
c 3 58,64,192,200,80,153,0,36,88,178 Latin 33 0 31 c # c [63 ]a
h 3 59,68,216,255,87,187,0,25,101,208 Latin 55 0 32 h # h [68 ]a
C 5 58,65,219,255,87,192,0,32,107,209 Latin 31 0 33 C # C [43 ]A
t 3 58,66,206,254,57,167,0,47,59,180 Latin 37 0 34 t # t [74 ]a
L 5 59,68,216,255,64,193,0,31,74,206 Latin 41 0 35 L # L [4c ]A
? 10 40,67,219,255,59,144,0,65,77,188 Common 36 10 36 ? # ? [3f ]p
T 5 59,68,216,255,85,227,0,47,88,236 Latin 34 0 37 T # T [54 ]A
M 5 57,68,216,255,99,301,0,35,117,286 Latin 23 0 38 M # M [4d ]A
y 3 0,47,187,202,87,199,0,25,87,230 Latin 100 0 39 y # y [79 ]a
R 5 57,68,216,255,88,227,0,27,104,232 Latin 22 0 40 R # R [52 ]A
l 3 59,68,216,255,11,147,0,56,27,173 Latin 35 0 41 l # l [6c ]a
~ 0 91,229,135,255,73,174,0,41,0,200 Common 42 10 42 ~ # ~ [7e ]
< 0 29,102,173,255,69,184,0,50,90,256 Common 43 10 76 < # < [3c ]
® 0 28,163,209,255,83,223,0,48,92,257 Common 44 10 44 ® # ® [ae ]
N 5 59,68,216,255,87,262,0,27,104,249 Latin 8 0 45 N # N [4e ]A
b 3 58,64,216,255,87,180,0,25,100,200 Latin 27 0 46 b # b [62 ]a
k 3 57,68,216,255,85,177,0,35,93,198 Latin 101 0 47 k # k [6b ]a
[ 10 8,64,216,255,39,136,0,80,55,173 Common 48 10 70 [ # [ [5b ]p
« 10 26,133,148,235,63,279,0,35,71,281 Common 49 10 28 « # « [ab ]p
1 8 49,69,192,255,45,128,0,66,74,173 Common 50 2 50 1 # 1 [31 ]0
, 10 14,46,79,115,17,78,0,58,30,173 Common 51 6 51 , # , [2c ]p
. 10 26,67,73,112,13,51,0,67,30,173 Common 52 6 52 . # . [2e ]p
” 10 141,233,216,255,59,141,0,87,66,298 Common 53 10 53 " # ” [201d ]p
g 3 0,43,188,212,88,176,0,32,100,210 Latin 93 0 54 g # g [67 ]a
H 5 59,68,216,255,91,258,0,27,107,244 Latin 32 0 55 H # H [48 ]A
$ 0 24,63,229,255,85,174,0,36,106,174 Common 56 4 56 $ # $ [24 ]
( 10 0,64,216,255,42,118,0,97,61,173 Common 57 10 94 ( # ( [28 ]p
+ 0 54,102,171,253,90,176,0,37,103,213 Common 58 3 58 + # + [2b ]
D 5 59,68,216,255,93,230,0,27,107,236 Latin 30 0 59 D # D [44 ]A
w 3 59,68,187,195,108,235,0,32,117,286 Latin 103 0 60 w # w [77 ]a
V 5 59,68,216,255,103,207,0,41,101,245 Latin 3 0 61 V # V [56 ]A
£ 0 0,135,219,255,64,201,0,55,61,298 Common 62 4 62 £ # £ [a3 ]
4 8 0,68,198,255,93,161,0,41,96,173 Common 63 2 63 4 # 4 [34 ]0
9 8 0,66,200,255,89,156,0,39,104,173 Common 64 2 64 9 # 9 [39 ]0
Q 5 7,64,219,255,91,205,0,30,106,227 Latin 96 0 65 Q # Q [51 ]A
& 10 53,64,194,255,108,232,0,47,112,239 Common 66 10 66 & # & [26 ]p
A 5 52,68,216,255,100,216,0,17,98,231 Latin 21 0 67 A # A [41 ]A
P 5 57,68,216,255,87,225,0,32,97,230 Latin 20 0 68 P # P [50 ]A
¢ 0 14,158,190,255,56,144,0,72,61,270 Common 69 4 69 ¢ # ¢ [a2 ]
] 10 8,64,216,255,39,129,0,44,55,173 Common 70 10 48 ] # ] [5d ]p
3 8 0,66,196,255,84,158,0,32,103,173 Common 71 2 71 3 # 3 [33 ]0
2 8 30,69,194,255,80,160,0,27,97,173 Common 72 2 72 2 # 2 [32 ]0
© 0 28,125,209,255,118,232,0,32,119,257 Common 73 10 73 © # © [a9 ]
8 8 57,66,219,255,88,162,0,41,103,174 Common 74 2 74 8 # 8 [38 ]0
/ 10 0,65,219,255,59,228,0,36,62,238 Common 75 6 75 / # / [2f ]p
> 0 29,102,173,255,78,184,0,50,90,256 Common 76 10 43 > # > [3e ]
X 5 59,68,216,255,94,275,0,25,93,256 Latin 86 0 77 X # X [58 ]A
é 3 0,64,222,255,87,384,0,32,98,391 Latin 78 0 78 é # é [e9 ]a
j 3 0,47,216,255,36,145,0,49,50,173 Latin 5 0 79 j # j [6a ]a
; 10 14,56,131,221,17,93,0,58,38,173 Common 80 10 80 ; # ; [3b ]p
7 8 12,68,196,255,72,160,0,60,75,173 Common 81 2 81 7 # 7 [37 ]0
€ 0 32,68,209,255,97,238,0,49,103,293 Common 82 4 82 € # € [20ac ]
O 5 57,64,219,255,91,209,0,34,106,233 Latin 6 0 83 O # O [4f ]A
¥ 0 59,75,209,255,91,238,0,52,91,270 Common 84 4 84 ¥ # ¥ [a5 ]
U 5 58,64,216,255,91,214,0,39,106,220 Latin 25 0 85 U # U [55 ]A
x 3 59,68,187,201,85,189,0,25,84,218 Latin 77 0 86 x # x [78 ]a
} 10 0,44,216,255,54,148,0,56,59,173 Common 87 10 97 } # } [7d ]p
E 5 59,68,216,255,68,210,0,31,80,219 Latin 4 0 88 E # E [45 ]A
§ 0 9,66,219,255,82,207,0,86,93,293 Common 89 10 89 § # § [a7 ]
= 0 74,139,144,199,90,186,0,32,103,224 Common 90 10 90 = # = [3d ]
! 10 41,67,216,255,11,87,0,71,50,173 Common 91 10 91 ! # ! [21 ]p
’ 10 141,233,212,255,17,78,0,109,30,298 Common 92 10 92 ' # ’ [2019 ]p
G 5 58,64,219,255,91,230,0,30,106,230 Latin 54 0 93 G # G [47 ]A
) 10 0,64,216,255,42,119,0,53,61,173 Common 94 10 57 ) # ) [29 ]p
Z 5 64,68,216,255,72,218,0,30,77,236 Latin 12 0 95 Z # Z [5a ]A
q 3 0,47,192,202,88,196,0,30,100,200 Latin 65 0 96 q # q [71 ]a
{ 10 0,44,216,255,54,148,0,71,59,173 Common 97 10 87 { # { [7b ]p
“ 10 141,233,216,255,56,133,0,172,66,298 Common 98 10 98 " # “ [201c ]p
— 10 110,155,132,167,126,297,0,23,136,298 Common 99 10 99 - # — [2014 ]p
Y 5 59,68,216,255,91,205,0,47,91,223 Latin 39 0 100 Y # Y [59 ]A
K 5 57,68,216,255,92,225,0,37,103,216 Latin 47 0 101 K # K [4b ]A
* 10 78,183,188,255,49,134,0,60,53,173 Common 102 10 102 * # * [2a ]p
W 5 54,68,216,255,106,314,0,41,117,318 Latin 60 0 103 W # W [57 ]A
" 10 151,225,216,255,52,115,0,71,71,173 Common 104 10 104 " # " [22 ]p
\ 10 0,67,219,255,28,250,0,71,62,261 Common 105 10 105 \ # \ [5c ]p
° 0 66,247,209,255,22,399,0,98,66,409 Common 106 4 106 ° # ° [b0 ]
fi 3 0,71,216,255,87,202,0,28,105,199 Latin 107 0 107 fi # fi [fb01 ]a
‘ 10 141,233,210,255,17,64,0,216,30,298 Common 108 10 108 ' # ‘ [2018 ]p
_ 10 0,50,0,64,73,248,0,29,75,259 Common 109 10 109 _ # _ [5f ]p
fl 3 0,71,216,255,87,219,0,28,105,236 Latin 110 0 110 fl # fl [fb02 ]a
Oops, something went wrong.

9 comments on commit 8e55e52

@amitdo

This comment has been minimized.

Show comment
Hide comment
@amitdo

amitdo Aug 19, 2017

Contributor

For LOG() glog is needed.
https://github.com/google/glog

Contributor

amitdo replied Aug 19, 2017

For LOG() glog is needed.
https://github.com/google/glog

@Shreeshrii

This comment has been minimized.

Show comment
Hide comment
@Shreeshrii

Shreeshrii Aug 24, 2018

Contributor

https://github.com/google/snappy/blob/master/snappy_unittest.cc

uses

CHECK_OK(file::GetContents(fname, &fullinput, file::Defaults()));

similar to

CHECK_OK(file::GetContents(unicharset_file, &uni_data, file::Defaults()));

above.

May point to other files that are required to get this test to build.

Contributor

Shreeshrii replied Aug 24, 2018

https://github.com/google/snappy/blob/master/snappy_unittest.cc

uses

CHECK_OK(file::GetContents(fname, &fullinput, file::Defaults()));

similar to

CHECK_OK(file::GetContents(unicharset_file, &uni_data, file::Defaults()));

above.

May point to other files that are required to get this test to build.

@amitdo

This comment has been minimized.

Show comment
Hide comment
@amitdo

amitdo Aug 24, 2018

Contributor

May point to other files that are required to get this test to build.

https://github.com/google/snappy/blob/7fefd231a19a0c9e10273a04204889d138d448b1/snappy-test.h

Contributor

amitdo replied Aug 24, 2018

May point to other files that are required to get this test to build.

https://github.com/google/snappy/blob/7fefd231a19a0c9e10273a04204889d138d448b1/snappy-test.h

@stweil

This comment has been minimized.

Show comment
Hide comment
@stweil

stweil Aug 24, 2018

Contributor

It can be rewritten like here. That's new test code from Google with some first patches (written in the last hour).

Contributor

stweil replied Aug 24, 2018

It can be rewritten like here. That's new test code from Google with some first patches (written in the last hour).

@Shreeshrii

This comment has been minimized.

Show comment
Hide comment
@Shreeshrii

Shreeshrii Aug 25, 2018

Contributor

Great to know that Google test code is now available.

Contributor

Shreeshrii replied Aug 25, 2018

Great to know that Google test code is now available.

@Shreeshrii

This comment has been minimized.

Show comment
Hide comment
@Shreeshrii

Shreeshrii Aug 25, 2018

Contributor

The related testdata will also be required for running the tests.

Contributor

Shreeshrii replied Aug 25, 2018

The related testdata will also be required for running the tests.

@stweil

This comment has been minimized.

Show comment
Hide comment
@stweil

stweil Aug 25, 2018

Contributor

Some tests don't require additional data, see pull request #1863 which adds two new working tests.

Contributor

stweil replied Aug 25, 2018

Some tests don't require additional data, see pull request #1863 which adds two new working tests.

@Shreeshrii

This comment has been minimized.

Show comment
Hide comment
@Shreeshrii

Shreeshrii Aug 25, 2018

Contributor

Thanks, @jbreiden for the test code from Google.

Thanks, @stweil, for starting to integrate them in GitHub repo.

I think Ray had mentioned that the testdata could also be shared since there were no proprietary images in it. If Jeff is able to provide it, that will be great.

Thanks for all your work. Appreciate it.

Contributor

Shreeshrii replied Aug 25, 2018

Thanks, @jbreiden for the test code from Google.

Thanks, @stweil, for starting to integrate them in GitHub repo.

I think Ray had mentioned that the testdata could also be shared since there were no proprietary images in it. If Jeff is able to provide it, that will be great.

Thanks for all your work. Appreciate it.

Please sign in to comment.