static void test_constructor(void) { GpStringFormat *format; GpStatus stat; INT n, count; StringAlignment align, valign; StringTrimming trimming; StringDigitSubstitute digitsub; LANGID digitlang; stat = GdipCreateStringFormat(0, LANG_NEUTRAL, &format); expect(Ok, stat); GdipGetStringFormatAlign(format, &align); GdipGetStringFormatLineAlign(format, &valign); GdipGetStringFormatHotkeyPrefix(format, &n); GdipGetStringFormatTrimming(format, &trimming); GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub); GdipGetStringFormatMeasurableCharacterRangeCount(format, &count); expect(HotkeyPrefixNone, n); expect(StringAlignmentNear, align); expect(StringAlignmentNear, align); expect(StringTrimmingCharacter, trimming); expect(StringDigitSubstituteUser, digitsub); expect(LANG_NEUTRAL, digitlang); expect(0, count); stat = GdipDeleteStringFormat(format); expect(Ok, stat); }
static void test_getgenericdefault(void) { GpStringFormat *format; GpStatus stat; INT flags; INT n; StringAlignment align, valign; StringTrimming trimming; StringDigitSubstitute digitsub; LANGID digitlang; INT tabcount; /* NULL arg */ stat = GdipStringFormatGetGenericDefault(NULL); expect(InvalidParameter, stat); stat = GdipStringFormatGetGenericDefault(&format); expect(Ok, stat); GdipGetStringFormatFlags(format, &flags); GdipGetStringFormatAlign(format, &align); GdipGetStringFormatLineAlign(format, &valign); GdipGetStringFormatHotkeyPrefix(format, &n); GdipGetStringFormatTrimming(format, &trimming); GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub); GdipGetStringFormatTabStopCount(format, &tabcount); expect(0, flags); expect(HotkeyPrefixNone, n); expect(StringAlignmentNear, align); expect(StringAlignmentNear, align); expect(StringTrimmingCharacter, trimming); expect(StringDigitSubstituteUser, digitsub); expect(LANG_NEUTRAL, digitlang); expect(0, tabcount); stat = GdipDeleteStringFormat(format); expect(Ok, stat); }
static void test_constructor(void) { GpStringFormat *format; GpStatus stat; INT n; StringAlignment align, valign; StringTrimming trimming; stat = GdipCreateStringFormat(0, 0, &format); expect(Ok, stat); GdipGetStringFormatAlign(format, &align); GdipGetStringFormatLineAlign(format, &valign); GdipGetStringFormatHotkeyPrefix(format, &n); GdipGetStringFormatTrimming(format, &trimming); expect(HotkeyPrefixNone, n); expect(StringAlignmentNear, align); expect(StringAlignmentNear, align); expect(StringTrimmingCharacter, trimming); stat = GdipDeleteStringFormat(format); expect(Ok, stat); }