1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/controls/richtextctrltest.cpp
3 // Purpose: wxRichTextCtrl unit test
4 // Author: Steven Lamerton
7 // Copyright: (c) 2010 Steven Lamerton
8 ///////////////////////////////////////////////////////////////////////////////
22 #include "wx/richtext/richtextctrl.h"
23 #include "wx/richtext/richtextstyles.h"
24 #include "testableframe.h"
25 #include "asserthelper.h"
26 #include "wx/uiaction.h"
28 class RichTextCtrlTestCase
: public CppUnit::TestCase
31 RichTextCtrlTestCase() { }
37 CPPUNIT_TEST_SUITE( RichTextCtrlTestCase
);
38 WXUISIM_TEST( CharacterEvent
);
39 WXUISIM_TEST( DeleteEvent
);
40 WXUISIM_TEST( ReturnEvent
);
41 CPPUNIT_TEST( StyleEvent
);
42 CPPUNIT_TEST( BufferResetEvent
);
43 WXUISIM_TEST( UrlEvent
);
44 WXUISIM_TEST( TextEvent
);
45 CPPUNIT_TEST( CutCopyPaste
);
46 CPPUNIT_TEST( UndoRedo
);
47 CPPUNIT_TEST( CaretPosition
);
48 CPPUNIT_TEST( Selection
);
49 WXUISIM_TEST( Editable
);
50 CPPUNIT_TEST( Range
);
51 CPPUNIT_TEST( Alignment
);
53 CPPUNIT_TEST( Italic
);
54 CPPUNIT_TEST( Underline
);
55 CPPUNIT_TEST( Indent
);
56 CPPUNIT_TEST( LineSpacing
);
57 CPPUNIT_TEST( ParagraphSpacing
);
58 CPPUNIT_TEST( TextColour
);
59 CPPUNIT_TEST( NumberedBullet
);
60 CPPUNIT_TEST( SymbolBullet
);
61 CPPUNIT_TEST( FontSize
);
63 CPPUNIT_TEST( Delete
);
65 CPPUNIT_TEST_SUITE_END();
67 void CharacterEvent();
71 void BufferResetEvent();
86 void ParagraphSpacing();
88 void NumberedBullet();
95 wxRichTextCtrl
* m_rich
;
97 DECLARE_NO_COPY_CLASS(RichTextCtrlTestCase
)
100 // register in the unnamed registry so that these tests are run by default
101 CPPUNIT_TEST_SUITE_REGISTRATION( RichTextCtrlTestCase
);
103 // also include in it's own registry so that these tests can be run alone
104 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( RichTextCtrlTestCase
, "RichTextCtrlTestCase" );
106 void RichTextCtrlTestCase::setUp()
108 m_rich
= new wxRichTextCtrl(wxTheApp
->GetTopWindow(), wxID_ANY
, "",
109 wxDefaultPosition
, wxSize(400, 200));
112 void RichTextCtrlTestCase::tearDown()
117 void RichTextCtrlTestCase::CharacterEvent()
119 #if wxUSE_UIACTIONSIMULATOR
120 wxTestableFrame
* frame
= wxStaticCast(wxTheApp
->GetTopWindow(),
123 EventCounter
count(m_rich
, wxEVT_COMMAND_RICHTEXT_CHARACTER
);
124 EventCounter
count1(m_rich
, wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED
);
128 wxUIActionSimulator sim
;
132 CPPUNIT_ASSERT_EQUAL(6, frame
->GetEventCount(wxEVT_COMMAND_RICHTEXT_CHARACTER
));
133 CPPUNIT_ASSERT_EQUAL(6, frame
->GetEventCount(wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED
));
135 //As these are not characters they shouldn't count
136 sim
.Char(WXK_RETURN
);
140 CPPUNIT_ASSERT_EQUAL(0, frame
->GetEventCount(wxEVT_COMMAND_RICHTEXT_CHARACTER
));
141 CPPUNIT_ASSERT_EQUAL(1, frame
->GetEventCount(wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED
));
145 void RichTextCtrlTestCase::DeleteEvent()
147 #if wxUSE_UIACTIONSIMULATOR
148 wxTestableFrame
* frame
= wxStaticCast(wxTheApp
->GetTopWindow(),
151 EventCounter
count(m_rich
, wxEVT_COMMAND_RICHTEXT_DELETE
);
152 EventCounter
count1(m_rich
, wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED
);
156 wxUIActionSimulator sim
;
159 sim
.Char(WXK_DELETE
);
162 CPPUNIT_ASSERT_EQUAL(2, frame
->GetEventCount(wxEVT_COMMAND_RICHTEXT_DELETE
));
163 //Only one as the delete doesn't delete anthing
164 CPPUNIT_ASSERT_EQUAL(1, frame
->GetEventCount(wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED
));
168 void RichTextCtrlTestCase::ReturnEvent()
170 #if wxUSE_UIACTIONSIMULATOR
171 wxTestableFrame
* frame
= wxStaticCast(wxTheApp
->GetTopWindow(),
174 EventCounter
count(m_rich
, wxEVT_COMMAND_RICHTEXT_RETURN
);
178 wxUIActionSimulator sim
;
179 sim
.Char(WXK_RETURN
);
182 CPPUNIT_ASSERT_EQUAL(1, frame
->GetEventCount());
186 void RichTextCtrlTestCase::StyleEvent()
188 wxTestableFrame
* frame
= wxStaticCast(wxTheApp
->GetTopWindow(),
191 EventCounter
count(m_rich
, wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED
);
193 m_rich
->SetValue("Sometext");
194 m_rich
->SetStyle(0, 8, wxTextAttr(*wxRED
, *wxWHITE
));
196 CPPUNIT_ASSERT_EQUAL(1, frame
->GetEventCount(wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED
));
199 void RichTextCtrlTestCase::BufferResetEvent()
201 wxTestableFrame
* frame
= wxStaticCast(wxTheApp
->GetTopWindow(),
204 EventCounter
count(m_rich
, wxEVT_COMMAND_RICHTEXT_BUFFER_RESET
);
206 m_rich
->AppendText("more text!");
207 m_rich
->SetValue("");
209 CPPUNIT_ASSERT_EQUAL(1, frame
->GetEventCount());
211 m_rich
->AppendText("more text!");
214 CPPUNIT_ASSERT_EQUAL(1, frame
->GetEventCount());
216 //We expect a buffer reset here as setvalue clears the existing text
217 m_rich
->SetValue("replace");
218 CPPUNIT_ASSERT_EQUAL(1, frame
->GetEventCount());
221 void RichTextCtrlTestCase::UrlEvent()
223 #if wxUSE_UIACTIONSIMULATOR
224 wxTestableFrame
* frame
= wxStaticCast(wxTheApp
->GetTopWindow(),
227 EventCounter
count(m_rich
, wxEVT_COMMAND_TEXT_URL
);
229 m_rich
->BeginURL("http://www.wxwidgets.org");
230 m_rich
->WriteText("http://www.wxwidgets.org");
233 wxUIActionSimulator sim
;
234 sim
.MouseMove(m_rich
->ClientToScreen(wxPoint(5, 5)));
240 CPPUNIT_ASSERT_EQUAL(1, frame
->GetEventCount());
244 void RichTextCtrlTestCase::TextEvent()
246 #if wxUSE_UIACTIONSIMULATOR
247 wxTestableFrame
* frame
= wxStaticCast(wxTheApp
->GetTopWindow(),
250 EventCounter
count(m_rich
, wxEVT_COMMAND_TEXT_UPDATED
);
254 wxUIActionSimulator sim
;
258 CPPUNIT_ASSERT_EQUAL("abcdef", m_rich
->GetValue());
259 CPPUNIT_ASSERT_EQUAL(6, frame
->GetEventCount());
263 void RichTextCtrlTestCase::CutCopyPaste()
266 m_rich
->AppendText("sometext");
269 if(m_rich
->CanCut() && m_rich
->CanPaste())
272 CPPUNIT_ASSERT(m_rich
->IsEmpty());
277 CPPUNIT_ASSERT_EQUAL("sometext", m_rich
->GetValue());
282 if(m_rich
->CanCopy() && m_rich
->CanPaste())
286 CPPUNIT_ASSERT(m_rich
->IsEmpty());
291 CPPUNIT_ASSERT_EQUAL("sometext", m_rich
->GetValue());
296 void RichTextCtrlTestCase::UndoRedo()
298 m_rich
->AppendText("sometext");
300 CPPUNIT_ASSERT(m_rich
->CanUndo());
304 CPPUNIT_ASSERT(m_rich
->IsEmpty());
305 CPPUNIT_ASSERT(m_rich
->CanRedo());
309 CPPUNIT_ASSERT_EQUAL("sometext", m_rich
->GetValue());
311 m_rich
->AppendText("Batch undo");
314 //Also test batch operations
315 m_rich
->BeginBatchUndo("batchtest");
317 m_rich
->ApplyBoldToSelection();
318 m_rich
->ApplyItalicToSelection();
320 m_rich
->EndBatchUndo();
322 CPPUNIT_ASSERT(m_rich
->CanUndo());
326 CPPUNIT_ASSERT(!m_rich
->IsSelectionBold());
327 CPPUNIT_ASSERT(!m_rich
->IsSelectionItalics());
328 CPPUNIT_ASSERT(m_rich
->CanRedo());
332 CPPUNIT_ASSERT(m_rich
->IsSelectionBold());
333 CPPUNIT_ASSERT(m_rich
->IsSelectionItalics());
335 //And surpressing undo
336 m_rich
->BeginSuppressUndo();
338 m_rich
->AppendText("Can't undo this");
340 CPPUNIT_ASSERT(m_rich
->CanUndo());
342 m_rich
->EndSuppressUndo();
345 void RichTextCtrlTestCase::CaretPosition()
347 m_rich
->AddParagraph("This is paragraph one");
348 m_rich
->AddParagraph("Paragraph two\n has \nlots of\n lines");
350 m_rich
->MoveCaret(1);
352 CPPUNIT_ASSERT_EQUAL(1, m_rich
->GetCaretPosition());
354 m_rich
->MoveToParagraphStart();
356 CPPUNIT_ASSERT_EQUAL(0, m_rich
->GetCaretPosition());
359 m_rich
->MoveRight(2);
363 CPPUNIT_ASSERT_EQUAL(2, m_rich
->GetCaretPosition());
365 m_rich
->MoveToParagraphEnd();
367 CPPUNIT_ASSERT_EQUAL(21, m_rich
->GetCaretPosition());
369 m_rich
->MoveToLineStart();
371 CPPUNIT_ASSERT_EQUAL(0, m_rich
->GetCaretPosition());
373 m_rich
->MoveToLineEnd();
375 CPPUNIT_ASSERT_EQUAL(21, m_rich
->GetCaretPosition());
378 void RichTextCtrlTestCase::Selection()
380 m_rich
->SetValue("some more text");
384 CPPUNIT_ASSERT_EQUAL("some more text", m_rich
->GetStringSelection());
386 m_rich
->SelectNone();
388 CPPUNIT_ASSERT_EQUAL("", m_rich
->GetStringSelection());
390 m_rich
->SelectWord(1);
392 CPPUNIT_ASSERT_EQUAL("some", m_rich
->GetStringSelection());
394 m_rich
->SetSelection(5, 14);
396 CPPUNIT_ASSERT_EQUAL("more text", m_rich
->GetStringSelection());
398 wxRichTextRange
range(5, 9);
400 m_rich
->SetSelectionRange(range
);
402 CPPUNIT_ASSERT_EQUAL("more", m_rich
->GetStringSelection());
405 void RichTextCtrlTestCase::Editable()
407 #if wxUSE_UIACTIONSIMULATOR
408 wxTestableFrame
* frame
= wxStaticCast(wxTheApp
->GetTopWindow(),
411 EventCounter
count(m_rich
, wxEVT_COMMAND_TEXT_UPDATED
);
415 wxUIActionSimulator sim
;
419 CPPUNIT_ASSERT_EQUAL("abcdef", m_rich
->GetValue());
420 CPPUNIT_ASSERT_EQUAL(6, frame
->GetEventCount());
422 m_rich
->SetEditable(false);
426 CPPUNIT_ASSERT_EQUAL("abcdef", m_rich
->GetValue());
427 CPPUNIT_ASSERT_EQUAL(0, frame
->GetEventCount());
431 void RichTextCtrlTestCase::Range()
433 wxRichTextRange
range(0, 10);
435 CPPUNIT_ASSERT_EQUAL(0, range
.GetStart());
436 CPPUNIT_ASSERT_EQUAL(10, range
.GetEnd());
437 CPPUNIT_ASSERT_EQUAL(11, range
.GetLength());
438 CPPUNIT_ASSERT(range
.Contains(5));
440 wxRichTextRange
outside(12, 14);
442 CPPUNIT_ASSERT(outside
.IsOutside(range
));
444 wxRichTextRange
inside(6, 7);
446 CPPUNIT_ASSERT(inside
.IsWithin(range
));
448 range
.LimitTo(inside
);
450 CPPUNIT_ASSERT(inside
== range
);
451 CPPUNIT_ASSERT(inside
+ range
== outside
);
452 CPPUNIT_ASSERT(outside
- range
== inside
);
457 CPPUNIT_ASSERT_EQUAL(4, range
.GetStart());
458 CPPUNIT_ASSERT_EQUAL(6, range
.GetEnd());
459 CPPUNIT_ASSERT_EQUAL(3, range
.GetLength());
461 inside
.SetRange(6, 4);
464 CPPUNIT_ASSERT(inside
== range
);
467 void RichTextCtrlTestCase::Alignment()
469 m_rich
->SetValue("text to align");
472 m_rich
->ApplyAlignmentToSelection(wxTEXT_ALIGNMENT_RIGHT
);
474 CPPUNIT_ASSERT(m_rich
->IsSelectionAligned(wxTEXT_ALIGNMENT_RIGHT
));
476 m_rich
->BeginAlignment(wxTEXT_ALIGNMENT_CENTRE
);
477 m_rich
->AddParagraph("middle aligned");
478 m_rich
->EndAlignment();
480 m_rich
->SetSelection(20, 25);
482 CPPUNIT_ASSERT(m_rich
->IsSelectionAligned(wxTEXT_ALIGNMENT_CENTRE
));
485 void RichTextCtrlTestCase::Bold()
487 m_rich
->SetValue("text to bold");
489 m_rich
->ApplyBoldToSelection();
491 CPPUNIT_ASSERT(m_rich
->IsSelectionBold());
494 m_rich
->AddParagraph("bold paragraph");
496 m_rich
->AddParagraph("not bold paragraph");
498 m_rich
->SetSelection(15, 20);
500 CPPUNIT_ASSERT(m_rich
->IsSelectionBold());
502 m_rich
->SetSelection(30, 35);
504 CPPUNIT_ASSERT(!m_rich
->IsSelectionBold());
507 void RichTextCtrlTestCase::Italic()
509 m_rich
->SetValue("text to italic");
511 m_rich
->ApplyItalicToSelection();
513 CPPUNIT_ASSERT(m_rich
->IsSelectionItalics());
515 m_rich
->BeginItalic();
516 m_rich
->AddParagraph("italic paragraph");
518 m_rich
->AddParagraph("not italic paragraph");
520 m_rich
->SetSelection(20, 25);
522 CPPUNIT_ASSERT(m_rich
->IsSelectionItalics());
524 m_rich
->SetSelection(35, 40);
526 CPPUNIT_ASSERT(!m_rich
->IsSelectionItalics());
529 void RichTextCtrlTestCase::Underline()
531 m_rich
->SetValue("text to underline");
533 m_rich
->ApplyUnderlineToSelection();
535 CPPUNIT_ASSERT(m_rich
->IsSelectionUnderlined());
537 m_rich
->BeginUnderline();
538 m_rich
->AddParagraph("underline paragraph");
539 m_rich
->EndUnderline();
540 m_rich
->AddParagraph("not underline paragraph");
542 m_rich
->SetSelection(20, 25);
544 CPPUNIT_ASSERT(m_rich
->IsSelectionUnderlined());
546 m_rich
->SetSelection(40, 45);
548 CPPUNIT_ASSERT(!m_rich
->IsSelectionUnderlined());
551 void RichTextCtrlTestCase::Indent()
553 m_rich
->BeginLeftIndent(12, -5);
554 m_rich
->BeginRightIndent(14);
555 m_rich
->AddParagraph("A paragraph with indents");
556 m_rich
->EndLeftIndent();
557 m_rich
->EndRightIndent();
558 m_rich
->AddParagraph("No more indent");
561 m_rich
->GetStyle(5, indent
);
563 CPPUNIT_ASSERT_EQUAL(12, indent
.GetLeftIndent());
564 CPPUNIT_ASSERT_EQUAL(-5, indent
.GetLeftSubIndent());
565 CPPUNIT_ASSERT_EQUAL(14, indent
.GetRightIndent());
567 m_rich
->GetStyle(35, indent
);
569 CPPUNIT_ASSERT_EQUAL(0, indent
.GetLeftIndent());
570 CPPUNIT_ASSERT_EQUAL(0, indent
.GetLeftSubIndent());
571 CPPUNIT_ASSERT_EQUAL(0, indent
.GetRightIndent());
574 void RichTextCtrlTestCase::LineSpacing()
576 m_rich
->BeginLineSpacing(20);
577 m_rich
->AddParagraph("double spaced");
578 m_rich
->EndLineSpacing();
579 m_rich
->BeginLineSpacing(wxTEXT_ATTR_LINE_SPACING_HALF
);
580 m_rich
->AddParagraph("1.5 spaced");
581 m_rich
->EndLineSpacing();
582 m_rich
->AddParagraph("normally spaced");
585 m_rich
->GetStyle(5, spacing
);
587 CPPUNIT_ASSERT_EQUAL(20, spacing
.GetLineSpacing());
589 m_rich
->GetStyle(20, spacing
);
591 CPPUNIT_ASSERT_EQUAL(15, spacing
.GetLineSpacing());
593 m_rich
->GetStyle(30, spacing
);
595 CPPUNIT_ASSERT_EQUAL(10, spacing
.GetLineSpacing());
598 void RichTextCtrlTestCase::ParagraphSpacing()
600 m_rich
->BeginParagraphSpacing(15, 20);
601 m_rich
->AddParagraph("spaced paragraph");
602 m_rich
->EndParagraphSpacing();
603 m_rich
->AddParagraph("non-spaced paragraph");
606 m_rich
->GetStyle(5, spacing
);
608 CPPUNIT_ASSERT_EQUAL(15, spacing
.GetParagraphSpacingBefore());
609 CPPUNIT_ASSERT_EQUAL(20, spacing
.GetParagraphSpacingAfter());
611 m_rich
->GetStyle(25, spacing
);
613 //Make sure we test against the defaults
614 CPPUNIT_ASSERT_EQUAL(m_rich
->GetBasicStyle().GetParagraphSpacingBefore(),
615 spacing
.GetParagraphSpacingBefore());
616 CPPUNIT_ASSERT_EQUAL(m_rich
->GetBasicStyle().GetParagraphSpacingAfter(),
617 spacing
.GetParagraphSpacingAfter());
620 void RichTextCtrlTestCase::TextColour()
622 m_rich
->BeginTextColour(*wxRED
);
623 m_rich
->AddParagraph("red paragraph");
624 m_rich
->EndTextColour();
625 m_rich
->AddParagraph("default paragraph");
628 m_rich
->GetStyle(5, colour
);
630 CPPUNIT_ASSERT_EQUAL(*wxRED
, colour
.GetTextColour());
632 m_rich
->GetStyle(25, colour
);
634 CPPUNIT_ASSERT_EQUAL(m_rich
->GetBasicStyle().GetTextColour(),
635 colour
.GetTextColour());
638 void RichTextCtrlTestCase::NumberedBullet()
640 m_rich
->BeginNumberedBullet(1, 15, 20);
641 m_rich
->AddParagraph("bullet one");
642 m_rich
->EndNumberedBullet();
643 m_rich
->BeginNumberedBullet(2, 25, -5);
644 m_rich
->AddParagraph("bullet two");
645 m_rich
->EndNumberedBullet();
648 m_rich
->GetStyle(5, bullet
);
650 CPPUNIT_ASSERT(bullet
.HasBulletStyle());
651 CPPUNIT_ASSERT(bullet
.HasBulletNumber());
652 CPPUNIT_ASSERT_EQUAL(1, bullet
.GetBulletNumber());
653 CPPUNIT_ASSERT_EQUAL(15, bullet
.GetLeftIndent());
654 CPPUNIT_ASSERT_EQUAL(20, bullet
.GetLeftSubIndent());
656 m_rich
->GetStyle(15, bullet
);
658 CPPUNIT_ASSERT(bullet
.HasBulletStyle());
659 CPPUNIT_ASSERT(bullet
.HasBulletNumber());
660 CPPUNIT_ASSERT_EQUAL(2, bullet
.GetBulletNumber());
661 CPPUNIT_ASSERT_EQUAL(25, bullet
.GetLeftIndent());
662 CPPUNIT_ASSERT_EQUAL(-5, bullet
.GetLeftSubIndent());
665 void RichTextCtrlTestCase::SymbolBullet()
667 m_rich
->BeginSymbolBullet("*", 15, 20);
668 m_rich
->AddParagraph("bullet one");
669 m_rich
->EndSymbolBullet();
670 m_rich
->BeginSymbolBullet("%", 25, -5);
671 m_rich
->AddParagraph("bullet two");
672 m_rich
->EndSymbolBullet();
675 m_rich
->GetStyle(5, bullet
);
677 CPPUNIT_ASSERT(bullet
.HasBulletStyle());
678 CPPUNIT_ASSERT(bullet
.HasBulletText());
679 CPPUNIT_ASSERT_EQUAL("*", bullet
.GetBulletText());
680 CPPUNIT_ASSERT_EQUAL(15, bullet
.GetLeftIndent());
681 CPPUNIT_ASSERT_EQUAL(20, bullet
.GetLeftSubIndent());
683 m_rich
->GetStyle(15, bullet
);
685 CPPUNIT_ASSERT(bullet
.HasBulletStyle());
686 CPPUNIT_ASSERT(bullet
.HasBulletText());
687 CPPUNIT_ASSERT_EQUAL("%", bullet
.GetBulletText());
688 CPPUNIT_ASSERT_EQUAL(25, bullet
.GetLeftIndent());
689 CPPUNIT_ASSERT_EQUAL(-5, bullet
.GetLeftSubIndent());
692 void RichTextCtrlTestCase::FontSize()
694 m_rich
->BeginFontSize(24);
695 m_rich
->AddParagraph("Large text");
696 m_rich
->EndFontSize();
699 m_rich
->GetStyle(5, size
);
701 CPPUNIT_ASSERT(size
.HasFontSize());
702 CPPUNIT_ASSERT_EQUAL(24, size
.GetFontSize());
705 void RichTextCtrlTestCase::Font()
707 wxFont
font(14, wxFONTFAMILY_DEFAULT
, wxFONTSTYLE_NORMAL
, wxFONTWEIGHT_NORMAL
);
708 m_rich
->BeginFont(font
);
709 m_rich
->AddParagraph("paragraph with font");
712 wxTextAttr fontstyle
;
713 m_rich
->GetStyle(5, fontstyle
);
715 CPPUNIT_ASSERT_EQUAL(font
, fontstyle
.GetFont());
718 void RichTextCtrlTestCase::Delete()
720 m_rich
->AddParagraph("here is a long long line in a paragraph");
721 m_rich
->SetSelection(0, 6);
723 CPPUNIT_ASSERT(m_rich
->CanDeleteSelection());
725 m_rich
->DeleteSelection();
727 CPPUNIT_ASSERT_EQUAL("is a long long line in a paragraph", m_rich
->GetValue());
729 m_rich
->SetSelection(0, 5);
731 CPPUNIT_ASSERT(m_rich
->CanDeleteSelection());
733 m_rich
->DeleteSelectedContent();
735 CPPUNIT_ASSERT_EQUAL("long long line in a paragraph", m_rich
->GetValue());
737 m_rich
->Delete(wxRichTextRange(14, 29));
739 CPPUNIT_ASSERT_EQUAL("long long line", m_rich
->GetValue());
742 void RichTextCtrlTestCase::Url()
744 m_rich
->BeginURL("http://www.wxwidgets.org");
745 m_rich
->WriteText("http://www.wxwidgets.org");
749 m_rich
->GetStyle(5, url
);
751 CPPUNIT_ASSERT(url
.HasURL());
752 CPPUNIT_ASSERT_EQUAL("http://www.wxwidgets.org", url
.GetURL());
755 #endif //wxUSE_RICHTEXT