Improve coverage of encoded streams

This commit is contained in:
Milo Yip 2015-04-14 21:50:13 +08:00
parent afe2fbdc3f
commit f8909e875b

View File

@ -160,6 +160,7 @@ protected:
} }
EXPECT_EQ('\0', s.Peek()); EXPECT_EQ('\0', s.Peek());
free(data); free(data);
EXPECT_EQ(size, eis.Tell());
} }
} }
@ -280,7 +281,7 @@ TEST_F(EncodedStreamTest, AutoUTFInputStream) {
{ {
// Auto detection fail, use user defined UTF type // Auto detection fail, use user defined UTF type
const char json[] = "{}"; const char json[] = "{ }";
MemoryStream ms(json, sizeof(json)); MemoryStream ms(json, sizeof(json));
AutoUTFInputStream<unsigned, MemoryStream> eis(ms, kUTF8); AutoUTFInputStream<unsigned, MemoryStream> eis(ms, kUTF8);
EXPECT_FALSE(eis.HasBOM()); EXPECT_FALSE(eis.HasBOM());