summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordfilimon@google.com <dfilimon@google.com@672e30a5-4c29-85ac-ac6d-611c735e0a51>2011-09-22 21:12:57 +0000
committerdfilimon@google.com <dfilimon@google.com@672e30a5-4c29-85ac-ac6d-611c735e0a51>2011-09-22 21:12:57 +0000
commit14783268d0367737c31150c0ea03bba7f9e4514e (patch)
tree33cba1f19b08a9077b5e9f4c646fe68d1a3461cd
parent0c18481adaebdef466bb1b5b0965f9f8db5e2081 (diff)
downloadsrc-14783268d0367737c31150c0ea03bba7f9e4514e.tar.gz
Fixing compilation issues on Windows.
git-svn-id: http://sfntly.googlecode.com/svn/trunk/cpp/src@95 672e30a5-4c29-85ac-ac6d-611c735e0a51
-rw-r--r--test/autogenerated/cmap_basic_test.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/autogenerated/cmap_basic_test.cc b/test/autogenerated/cmap_basic_test.cc
index ddf3aa5..07c54e1 100644
--- a/test/autogenerated/cmap_basic_test.cc
+++ b/test/autogenerated/cmap_basic_test.cc
@@ -81,7 +81,7 @@ void CMapBasicTests::SetUp() {
TEST_P(CMapBasicTests, BasicTest) {
TiXmlNodeVector* cmap_table = GetNodesWithName(&document_, "cmap_table");
// A font can only have one CMap table
- ASSERT_EQ(cmap_table->size(), 1);
+ ASSERT_EQ(cmap_table->size(), (int32_t)1);
TiXmlNodeVector* cmaps = GetNodesWithName(cmap_table->at(0), "cmap");
const TiXmlAttribute* num_cmaps_attr = GetAttribute(cmap_table->at(0),
"num_cmaps");
@@ -105,7 +105,11 @@ TEST_P(CMapBasicTests, BasicTest) {
for (TiXmlNodeVector::iterator jt = maps->begin();
jt != maps->end(); ++jt) {
int32_t character;
+#if defined (WIN32)
+ sscanf_s(GetAttribute(*jt, "char")->Value(), "%x", &character);
+#else
sscanf(GetAttribute(*jt, "char")->Value(), "%x", &character);
+#endif
int32_t glyph_id = GetAttribute(*jt, "gid")->IntValue();
ASSERT_EQ(cmap->GlyphId(character), glyph_id);
}