]> git.saurik.com Git - wxWidgets.git/commitdiff
Add wx(Simple)HtmlListBox unit test.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 27 Nov 2010 11:34:34 +0000 (11:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 27 Nov 2010 11:34:34 +0000 (11:34 +0000)
For now just test the wxItemContainer methods.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/Makefile.in
tests/controls/htmllboxtest.cpp [new file with mode: 0644]
tests/makefile.bcc
tests/makefile.gcc
tests/makefile.vc
tests/makefile.wat
tests/test.bkl
tests/test_test_gui.dsp
tests/test_vc7_test_gui.vcproj
tests/test_vc8_test_gui.vcproj
tests/test_vc9_test_gui.vcproj

index 64b4e3ee6b3d383e1ede4e8a59211940dee4bdaa..217973f281af252988e341938319bd93a78639d4 100644 (file)
@@ -168,6 +168,7 @@ TEST_GUI_OBJECTS =  \
        test_gui_gaugetest.o \
        test_gui_gridtest.o \
        test_gui_headerctrltest.o \
        test_gui_gaugetest.o \
        test_gui_gridtest.o \
        test_gui_headerctrltest.o \
+       test_gui_htmllboxtest.o \
        test_gui_hyperlinkctrltest.o \
        test_gui_itemcontainertest.o \
        test_gui_label.o \
        test_gui_hyperlinkctrltest.o \
        test_gui_itemcontainertest.o \
        test_gui_label.o \
@@ -726,6 +727,9 @@ test_gui_gridtest.o: $(srcdir)/controls/gridtest.cpp $(TEST_GUI_ODEP)
 test_gui_headerctrltest.o: $(srcdir)/controls/headerctrltest.cpp $(TEST_GUI_ODEP)
        $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/headerctrltest.cpp
 
 test_gui_headerctrltest.o: $(srcdir)/controls/headerctrltest.cpp $(TEST_GUI_ODEP)
        $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/headerctrltest.cpp
 
+test_gui_htmllboxtest.o: $(srcdir)/controls/htmllboxtest.cpp $(TEST_GUI_ODEP)
+       $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/htmllboxtest.cpp
+
 test_gui_hyperlinkctrltest.o: $(srcdir)/controls/hyperlinkctrltest.cpp $(TEST_GUI_ODEP)
        $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/hyperlinkctrltest.cpp
 
 test_gui_hyperlinkctrltest.o: $(srcdir)/controls/hyperlinkctrltest.cpp $(TEST_GUI_ODEP)
        $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/hyperlinkctrltest.cpp
 
diff --git a/tests/controls/htmllboxtest.cpp b/tests/controls/htmllboxtest.cpp
new file mode 100644 (file)
index 0000000..2fa17aa
--- /dev/null
@@ -0,0 +1,59 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        tests/controls/htmllboxtest.cpp
+// Purpose:     wxSimpleHtmlListBoxNameStr unit test
+// Author:      Vadim Zeitlin
+// Created:     2010-11-27
+// RCS-ID:      $Id$
+// Copyright:   (c) 2010 Vadim Zeitlin <vadim@wxwidgets.org>
+///////////////////////////////////////////////////////////////////////////////
+
+#include "testprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+#endif // WX_PRECOMP
+
+#include "wx/htmllbox.h"
+#include "itemcontainertest.h"
+
+class HtmlListBoxTestCase : public ItemContainerTestCase,
+                            public CppUnit::TestCase
+{
+public:
+    HtmlListBoxTestCase() { }
+
+    virtual void setUp();
+    virtual void tearDown();
+
+private:
+    virtual wxItemContainer *GetContainer() const { return m_htmllbox; }
+    virtual wxWindow *GetContainerWindow() const { return m_htmllbox; }
+
+    CPPUNIT_TEST_SUITE( HtmlListBoxTestCase );
+        wxITEM_CONTAINER_TESTS();
+    CPPUNIT_TEST_SUITE_END();
+
+    wxSimpleHtmlListBox* m_htmllbox;
+
+    DECLARE_NO_COPY_CLASS(HtmlListBoxTestCase)
+};
+
+// register in the unnamed registry so that these tests are run by default
+CPPUNIT_TEST_SUITE_REGISTRATION( HtmlListBoxTestCase );
+
+// also include in it's own registry so that these tests can be run alone
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( HtmlListBoxTestCase, "HtmlListBoxTestCase" );
+
+void HtmlListBoxTestCase::setUp()
+{
+    m_htmllbox = new wxSimpleHtmlListBox(wxTheApp->GetTopWindow(), wxID_ANY);
+}
+
+void HtmlListBoxTestCase::tearDown()
+{
+    wxDELETE(m_htmllbox);
+}
index c7f9b74cb05ff204422295b6f095fafb5df2be63..19850fd94c1c47d27a46a333896e98e55ebe388f 100644 (file)
@@ -153,6 +153,7 @@ TEST_GUI_OBJECTS =  \
        $(OBJS)\test_gui_gaugetest.obj \\r
        $(OBJS)\test_gui_gridtest.obj \\r
        $(OBJS)\test_gui_headerctrltest.obj \\r
        $(OBJS)\test_gui_gaugetest.obj \\r
        $(OBJS)\test_gui_gridtest.obj \\r
        $(OBJS)\test_gui_headerctrltest.obj \\r
+       $(OBJS)\test_gui_htmllboxtest.obj \
        $(OBJS)\test_gui_hyperlinkctrltest.obj \\r
        $(OBJS)\test_gui_itemcontainertest.obj \\r
        $(OBJS)\test_gui_label.obj \\r
        $(OBJS)\test_gui_hyperlinkctrltest.obj \\r
        $(OBJS)\test_gui_itemcontainertest.obj \\r
        $(OBJS)\test_gui_label.obj \\r
@@ -772,6 +773,9 @@ $(OBJS)\test_gui_gridtest.obj: .\controls\gridtest.cpp
 $(OBJS)\test_gui_headerctrltest.obj: .\controls\headerctrltest.cpp\r
        $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\headerctrltest.cpp\r
 \r
 $(OBJS)\test_gui_headerctrltest.obj: .\controls\headerctrltest.cpp\r
        $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\headerctrltest.cpp\r
 \r
+$(OBJS)\test_gui_htmllboxtest.obj: .\controls\htmllboxtest.cpp
+       $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\htmllboxtest.cpp
+
 $(OBJS)\test_gui_hyperlinkctrltest.obj: .\controls\hyperlinkctrltest.cpp\r
        $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\hyperlinkctrltest.cpp\r
 \r
 $(OBJS)\test_gui_hyperlinkctrltest.obj: .\controls\hyperlinkctrltest.cpp\r
        $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\hyperlinkctrltest.cpp\r
 \r
index d5c284bff57e8a87fc9df7cc209b0fbc259a6b5d..33975f40e003c9a567fe75bf90b037393e6ba74f 100644 (file)
@@ -146,6 +146,7 @@ TEST_GUI_OBJECTS =  \
        $(OBJS)\test_gui_gaugetest.o \\r
        $(OBJS)\test_gui_gridtest.o \\r
        $(OBJS)\test_gui_headerctrltest.o \\r
        $(OBJS)\test_gui_gaugetest.o \\r
        $(OBJS)\test_gui_gridtest.o \\r
        $(OBJS)\test_gui_headerctrltest.o \\r
+       $(OBJS)\test_gui_htmllboxtest.o \
        $(OBJS)\test_gui_hyperlinkctrltest.o \\r
        $(OBJS)\test_gui_itemcontainertest.o \\r
        $(OBJS)\test_gui_label.o \\r
        $(OBJS)\test_gui_hyperlinkctrltest.o \\r
        $(OBJS)\test_gui_itemcontainertest.o \\r
        $(OBJS)\test_gui_label.o \\r
@@ -753,6 +754,9 @@ $(OBJS)\test_gui_gridtest.o: ./controls/gridtest.cpp
 $(OBJS)\test_gui_headerctrltest.o: ./controls/headerctrltest.cpp\r
        $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<\r
 \r
 $(OBJS)\test_gui_headerctrltest.o: ./controls/headerctrltest.cpp\r
        $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<\r
 \r
+$(OBJS)\test_gui_htmllboxtest.o: ./controls/htmllboxtest.cpp
+       $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<
+
 $(OBJS)\test_gui_hyperlinkctrltest.o: ./controls/hyperlinkctrltest.cpp\r
        $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<\r
 \r
 $(OBJS)\test_gui_hyperlinkctrltest.o: ./controls/hyperlinkctrltest.cpp\r
        $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<\r
 \r
index 855214400330cd34aa2fdb775eabb7541db9f856..a51e353775cf65d0c3d6c5fdff44d9b7e0ae925f 100644 (file)
@@ -148,6 +148,7 @@ TEST_GUI_OBJECTS =  \
        $(OBJS)\test_gui_gaugetest.obj \\r
        $(OBJS)\test_gui_gridtest.obj \\r
        $(OBJS)\test_gui_headerctrltest.obj \\r
        $(OBJS)\test_gui_gaugetest.obj \\r
        $(OBJS)\test_gui_gridtest.obj \\r
        $(OBJS)\test_gui_headerctrltest.obj \\r
+       $(OBJS)\test_gui_htmllboxtest.obj \
        $(OBJS)\test_gui_hyperlinkctrltest.obj \\r
        $(OBJS)\test_gui_itemcontainertest.obj \\r
        $(OBJS)\test_gui_label.obj \\r
        $(OBJS)\test_gui_hyperlinkctrltest.obj \\r
        $(OBJS)\test_gui_itemcontainertest.obj \\r
        $(OBJS)\test_gui_label.obj \\r
@@ -898,6 +899,9 @@ $(OBJS)\test_gui_gridtest.obj: .\controls\gridtest.cpp
 $(OBJS)\test_gui_headerctrltest.obj: .\controls\headerctrltest.cpp\r
        $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\headerctrltest.cpp\r
 \r
 $(OBJS)\test_gui_headerctrltest.obj: .\controls\headerctrltest.cpp\r
        $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\headerctrltest.cpp\r
 \r
+$(OBJS)\test_gui_htmllboxtest.obj: .\controls\htmllboxtest.cpp
+       $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\htmllboxtest.cpp
+
 $(OBJS)\test_gui_hyperlinkctrltest.obj: .\controls\hyperlinkctrltest.cpp\r
        $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\hyperlinkctrltest.cpp\r
 \r
 $(OBJS)\test_gui_hyperlinkctrltest.obj: .\controls\hyperlinkctrltest.cpp\r
        $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\hyperlinkctrltest.cpp\r
 \r
index b3eb9730325b56508489ce9f4fbc8095e0f08d49..2fc3f6f60db83c933341cd87318d9debe03b00b2 100644 (file)
@@ -388,6 +388,7 @@ TEST_GUI_OBJECTS =  &
        $(OBJS)\test_gui_gaugetest.obj &\r
        $(OBJS)\test_gui_gridtest.obj &\r
        $(OBJS)\test_gui_headerctrltest.obj &\r
        $(OBJS)\test_gui_gaugetest.obj &\r
        $(OBJS)\test_gui_gridtest.obj &\r
        $(OBJS)\test_gui_headerctrltest.obj &\r
+       $(OBJS)\test_gui_htmllboxtest.obj &
        $(OBJS)\test_gui_hyperlinkctrltest.obj &\r
        $(OBJS)\test_gui_itemcontainertest.obj &\r
        $(OBJS)\test_gui_label.obj &\r
        $(OBJS)\test_gui_hyperlinkctrltest.obj &\r
        $(OBJS)\test_gui_itemcontainertest.obj &\r
        $(OBJS)\test_gui_label.obj &\r
@@ -811,6 +812,9 @@ $(OBJS)\test_gui_gridtest.obj :  .AUTODEPEND .\controls\gridtest.cpp
 $(OBJS)\test_gui_headerctrltest.obj :  .AUTODEPEND .\controls\headerctrltest.cpp\r
        $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<\r
 \r
 $(OBJS)\test_gui_headerctrltest.obj :  .AUTODEPEND .\controls\headerctrltest.cpp\r
        $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<\r
 \r
+$(OBJS)\test_gui_htmllboxtest.obj :  .AUTODEPEND .\controls\htmllboxtest.cpp
+       $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<
+
 $(OBJS)\test_gui_hyperlinkctrltest.obj :  .AUTODEPEND .\controls\hyperlinkctrltest.cpp\r
        $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<\r
 \r
 $(OBJS)\test_gui_hyperlinkctrltest.obj :  .AUTODEPEND .\controls\hyperlinkctrltest.cpp\r
        $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<\r
 \r
index 9b8f76833d19233a91e77eb55df0212b2e94a838..99836fa7ca91bf6b8205c9d79a34a8332a5e2af7 100644 (file)
             controls/gaugetest.cpp
             controls/gridtest.cpp
             controls/headerctrltest.cpp
             controls/gaugetest.cpp
             controls/gridtest.cpp
             controls/headerctrltest.cpp
+            controls/htmllboxtest.cpp
             controls/hyperlinkctrltest.cpp
             controls/itemcontainertest.cpp
             controls/label.cpp
             controls/hyperlinkctrltest.cpp
             controls/itemcontainertest.cpp
             controls/label.cpp
index 6b6b845b56bf70aa89f4c665ca0cde6144f7790a..44d463f4516ae40a0e4ea2adc28e8f88163298a4 100644 (file)
@@ -337,6 +337,10 @@ SOURCE=.\controls\headerctrltest.cpp
 # End Source File\r
 # Begin Source File\r
 \r
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=.\controls\htmllboxtest.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\html\htmlwindow.cpp\r
 # End Source File\r
 # Begin Source File\r
 SOURCE=.\html\htmlwindow.cpp\r
 # End Source File\r
 # Begin Source File\r
index 4b506325a89fc6674ac3fc79ce22a8914967765e..e26c3f7326c103fb4c76e5b9bf7c033496ba5c55 100644 (file)
                                RelativePath=".\controls\headerctrltest.cpp">\r
                        </File>\r
                        <File\r
                                RelativePath=".\controls\headerctrltest.cpp">\r
                        </File>\r
                        <File\r
+                               RelativePath=".\controls\htmllboxtest.cpp">
+                       </File>
+                       <File
                                RelativePath=".\html\htmlwindow.cpp">\r
                        </File>\r
                        <File\r
                                RelativePath=".\html\htmlwindow.cpp">\r
                        </File>\r
                        <File\r
index 687e5e7e013f2496381bbbf14426a53870e82874..a44e6aebab8090d5d0113942c249eed8d32ac532 100644 (file)
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\controls\htmllboxtest.cpp"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\html\htmlwindow.cpp"\r
                                >\r
                        </File>\r
                                RelativePath=".\html\htmlwindow.cpp"\r
                                >\r
                        </File>\r
index 939d0453af2af1b79fd779c81432d22e89ac42ca..357af513545144b7723ba5f18212c936425db9a9 100644 (file)
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\controls\htmllboxtest.cpp"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\html\htmlwindow.cpp"\r
                                >\r
                        </File>\r
                                RelativePath=".\html\htmlwindow.cpp"\r
                                >\r
                        </File>\r