aboutsummaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authordfilimon <dfilimon@google.com>2011-09-22 21:12:57 +0000
committerdfilimon <dfilimon@google.com>2011-09-22 21:12:57 +0000
commitd456f88549a5ee0532b4cd38b1a03fd4a60c52c4 (patch)
treef5fa0fde92aae1066da485de59f45d8c05dae254 /cpp
parentfe087f8510074215a8cbfd39555f224c50bee362 (diff)
downloadsfntly-d456f88549a5ee0532b4cd38b1a03fd4a60c52c4.tar.gz
Fixing compilation issues on Windows.
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/test/autogenerated/cmap_basic_test.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/test/autogenerated/cmap_basic_test.cc b/cpp/src/test/autogenerated/cmap_basic_test.cc
index ddf3aa5..07c54e1 100644
--- a/cpp/src/test/autogenerated/cmap_basic_test.cc
+++ b/cpp/src/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);
}