+ // Retrieving just the descent should work.
+ int descent = -17;
+ dc.GetTextExtent("foo", NULL, NULL, &descent);
+ CPPUNIT_ASSERT( descent != -17 );
+
+ // Same for external leading.
+ int leading = -289;
+ dc.GetTextExtent("foo", NULL, NULL, NULL, &leading);
+ CPPUNIT_ASSERT( leading != -289 );
+
+ // And both should also work for the empty string as they retrieve the
+ // values valid for the entire font and not just this string.
+ int descent2,
+ leading2;
+ dc.GetTextExtent("", NULL, NULL, &descent2, &leading2);
+
+ CPPUNIT_ASSERT_EQUAL( descent, descent2 );
+ CPPUNIT_ASSERT_EQUAL( leading, leading2 );