]> git.saurik.com Git - wxWidgets.git/commitdiff
extract wxTextEntry unit tests in a reusable base class
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 19 Sep 2008 08:55:25 +0000 (08:55 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 19 Sep 2008 08:55:25 +0000 (08:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 files changed:
tests/Makefile.in
tests/controls/textctrltest.cpp
tests/controls/textentrytest.cpp [new file with mode: 0644]
tests/controls/textentrytest.h [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

index 363babc1508ee2da2b467bf5d63459cbd02e53a4..b19b5a6d4d41affba7e0d263fa93c9f89cd31acd 100644 (file)
@@ -121,6 +121,7 @@ TEST_GUI_OBJECTS =  \
        test_gui_point.o \
        test_gui_config.o \
        test_gui_textctrltest.o \
+       test_gui_textentrytest.o \
        test_gui_rawbmp.o \
        test_gui_selstoretest.o \
        test_gui_clientsize.o \
@@ -180,10 +181,16 @@ COND_MONOLITHIC_0___WXLIB_XML_p = \
 @COND_PLATFORM_MACOSX_1_USE_GUI_1@     = test_gui.app/Contents/PkgInfo
 @COND_PLATFORM_MACOSX_1_USE_GUI_1@__test_gui_bundle___depname \
 @COND_PLATFORM_MACOSX_1_USE_GUI_1@     = test_gui_bundle
-@COND_TOOLKIT_COCOA@____test_gui_BUNDLE_TGT_REF_DEP = \
-@COND_TOOLKIT_COCOA@   $(__test_gui_app_Contents_PkgInfo___depname)
 @COND_TOOLKIT_MAC@____test_gui_BUNDLE_TGT_REF_DEP = \
 @COND_TOOLKIT_MAC@     $(__test_gui_app_Contents_PkgInfo___depname)
+@COND_TOOLKIT_OSX_CARBON@____test_gui_BUNDLE_TGT_REF_DEP \
+@COND_TOOLKIT_OSX_CARBON@      = $(__test_gui_app_Contents_PkgInfo___depname)
+@COND_TOOLKIT_OSX_COCOA@____test_gui_BUNDLE_TGT_REF_DEP \
+@COND_TOOLKIT_OSX_COCOA@       = $(__test_gui_app_Contents_PkgInfo___depname)
+@COND_TOOLKIT_OSX_IPHONE@____test_gui_BUNDLE_TGT_REF_DEP \
+@COND_TOOLKIT_OSX_IPHONE@      = $(__test_gui_app_Contents_PkgInfo___depname)
+@COND_TOOLKIT_COCOA@____test_gui_BUNDLE_TGT_REF_DEP = \
+@COND_TOOLKIT_COCOA@   $(__test_gui_app_Contents_PkgInfo___depname)
 @COND_GCC_PCH_1@__test_gui_PCH_INC = -I.pch/testprec_test_gui
 @COND_ICC_PCH_1@__test_gui_PCH_INC = -use_pch \
 @COND_ICC_PCH_1@       .pch/testprec_test_gui/testprec.h.gch
@@ -514,6 +521,9 @@ test_gui_config.o: $(srcdir)/config/config.cpp $(TEST_GUI_ODEP)
 test_gui_textctrltest.o: $(srcdir)/controls/textctrltest.cpp $(TEST_GUI_ODEP)
        $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/textctrltest.cpp
 
+test_gui_textentrytest.o: $(srcdir)/controls/textentrytest.cpp $(TEST_GUI_ODEP)
+       $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/textentrytest.cpp
+
 test_gui_rawbmp.o: $(srcdir)/image/rawbmp.cpp $(TEST_GUI_ODEP)
        $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/image/rawbmp.cpp
 
index 02c600d55967a134ff58906d18896c344b45a790..afc923afa799729726c0fc67f28442bc61eae94e 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        tests/textctrl/textctrltest.cpp
+// Name:        tests/controls/textctrltest.cpp
 // Purpose:     wxTextCtrl unit test
 // Author:      Vadim Zeitlin
 // Created:     2007-09-25
     #include "wx/textctrl.h"
 #endif // WX_PRECOMP
 
+#include "textentrytest.h"
+
 // ----------------------------------------------------------------------------
 // test class
 // ----------------------------------------------------------------------------
 
-class TextCtrlTestCase : public CppUnit::TestCase
+class TextCtrlTestCase : public TextEntryTestCase
 {
 public:
     TextCtrlTestCase() { }
@@ -35,24 +37,14 @@ public:
     virtual void tearDown();
 
 private:
+    virtual wxTextEntry *GetTestEntry() const { return m_text; }
+    virtual wxWindow *GetTestWindow() const { return m_text; }
+
     CPPUNIT_TEST_SUITE( TextCtrlTestCase );
-        CPPUNIT_TEST( SetValue );
-        CPPUNIT_TEST( TextChangeEvents );
-        CPPUNIT_TEST( Selection );
-        CPPUNIT_TEST( InsertionPoint );
+        wxTEXT_ENTRY_TESTS();
     CPPUNIT_TEST_SUITE_END();
 
-    void SetValue();
-    void TextChangeEvents();
-    void Selection();
-    void InsertionPoint();
-
-    // Selection() test helper: verify that selection is as described by the
-    // function parameters
-    void AssertSelection(int from, int to, const char *sel);
-
     wxTextCtrl *m_text;
-    wxFrame *m_frame;
 
     DECLARE_NO_COPY_CLASS(TextCtrlTestCase)
 };
@@ -82,132 +74,3 @@ void TextCtrlTestCase::tearDown()
 // tests themselves
 // ----------------------------------------------------------------------------
 
-void TextCtrlTestCase::SetValue()
-{
-    CPPUNIT_ASSERT( m_text->IsEmpty() );
-
-    m_text->SetValue("foo");
-    CPPUNIT_ASSERT_EQUAL( "foo", m_text->GetValue() );
-
-    m_text->SetValue("");
-    CPPUNIT_ASSERT( m_text->IsEmpty() );
-
-    m_text->SetValue("hi");
-    CPPUNIT_ASSERT_EQUAL( "hi", m_text->GetValue() );
-
-    m_text->SetValue("bye");
-    CPPUNIT_ASSERT_EQUAL( "bye", m_text->GetValue() );
-}
-
-void TextCtrlTestCase::TextChangeEvents()
-{
-    class TextTestEventHandler : public wxEvtHandler
-    {
-    public:
-        TextTestEventHandler() { m_events = 0; }
-
-        // calling this automatically resets the events counter
-        int GetEvents()
-        {
-            const int events = m_events;
-            m_events = 0;
-            return events;
-        }
-
-        void OnText(wxCommandEvent& WXUNUSED(event)) { m_events++; }
-
-    private:
-        int m_events;
-    } handler;
-
-    m_text->Connect(wxEVT_COMMAND_TEXT_UPDATED,
-                    wxCommandEventHandler(TextTestEventHandler::OnText),
-                    NULL,
-                    &handler);
-
-    // notice that SetValue() generates an event even if the text didn't change
-    m_text->SetValue("");
-    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
-
-    m_text->SetValue("foo");
-    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
-
-    m_text->SetValue("foo");
-    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
-
-    m_text->ChangeValue("bar");
-    CPPUNIT_ASSERT_EQUAL( 0, handler.GetEvents() );
-
-    m_text->AppendText("bar");
-    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
-
-    m_text->Replace(3, 6, "baz");
-    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
-
-    m_text->Remove(0, 3);
-    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
-
-    m_text->WriteText("foo");
-    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
-
-    m_text->Clear();
-    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
-}
-
-void TextCtrlTestCase::AssertSelection(int from, int to, const char *sel)
-{
-    CPPUNIT_ASSERT( m_text->HasSelection() );
-
-    long fromReal,
-         toReal;
-    m_text->GetSelection(&fromReal, &toReal);
-    CPPUNIT_ASSERT_EQUAL( from, fromReal );
-    CPPUNIT_ASSERT_EQUAL( to, toReal );
-    CPPUNIT_ASSERT_EQUAL( sel, m_text->GetStringSelection() );
-
-    CPPUNIT_ASSERT_EQUAL( from, m_text->GetInsertionPoint() );
-}
-
-void TextCtrlTestCase::Selection()
-{
-    m_text->SetValue("0123456789");
-
-    m_text->SetSelection(2, 4);
-    AssertSelection(2, 4, "23"); // not "234"!
-
-    m_text->SetSelection(3, -1);
-    AssertSelection(3, 10, "3456789");
-
-    m_text->SelectAll();
-    AssertSelection(0, 10, "0123456789");
-
-    m_text->SetSelection(0, 0);
-    CPPUNIT_ASSERT( !m_text->HasSelection() );
-}
-
-void TextCtrlTestCase::InsertionPoint()
-{
-    CPPUNIT_ASSERT_EQUAL( 0, m_text->GetLastPosition() );
-    CPPUNIT_ASSERT_EQUAL( 0, m_text->GetInsertionPoint() );
-
-    m_text->SetValue("0"); // should put the insertion point in front
-    CPPUNIT_ASSERT_EQUAL( 1, m_text->GetLastPosition() );
-    CPPUNIT_ASSERT_EQUAL( 0, m_text->GetInsertionPoint() );
-
-    m_text->AppendText("12"); // should update the insertion point position
-    CPPUNIT_ASSERT_EQUAL( 3, m_text->GetLastPosition() );
-    CPPUNIT_ASSERT_EQUAL( 3, m_text->GetInsertionPoint() );
-
-    m_text->SetInsertionPoint(1);
-    CPPUNIT_ASSERT_EQUAL( 3, m_text->GetLastPosition() );
-    CPPUNIT_ASSERT_EQUAL( 1, m_text->GetInsertionPoint() );
-
-    m_text->SetInsertionPointEnd();
-    CPPUNIT_ASSERT_EQUAL( 3, m_text->GetInsertionPoint() );
-
-    m_text->SetInsertionPoint(0);
-    m_text->WriteText("-"); // should move it after the written text
-    CPPUNIT_ASSERT_EQUAL( 4, m_text->GetLastPosition() );
-    CPPUNIT_ASSERT_EQUAL( 1, m_text->GetInsertionPoint() );
-}
-
diff --git a/tests/controls/textentrytest.cpp b/tests/controls/textentrytest.cpp
new file mode 100644 (file)
index 0000000..80e6482
--- /dev/null
@@ -0,0 +1,161 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        tests/controls/textentrytest.cpp
+// Purpose:     TestEntryTestCase implementation
+// Author:      Vadim Zeitlin
+// Created:     2008-09-19 (extracted from textctrltest.cpp)
+// RCS-ID:      $Id$
+// Copyright:   (c) 2007, 2008 Vadim Zeitlin <vadim@wxwidgets.org>
+///////////////////////////////////////////////////////////////////////////////
+
+#include "testprec.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/event.h"
+    #include "wx/textentry.h"
+    #include "wx/window.h"
+#endif // WX_PRECOMP
+
+#include "textentrytest.h"
+
+void TextEntryTestCase::SetValue()
+{
+    wxTextEntry * const entry = GetTestEntry();
+
+    CPPUNIT_ASSERT( entry->IsEmpty() );
+
+    entry->SetValue("foo");
+    CPPUNIT_ASSERT_EQUAL( "foo", entry->GetValue() );
+
+    entry->SetValue("");
+    CPPUNIT_ASSERT( entry->IsEmpty() );
+
+    entry->SetValue("hi");
+    CPPUNIT_ASSERT_EQUAL( "hi", entry->GetValue() );
+
+    entry->SetValue("bye");
+    CPPUNIT_ASSERT_EQUAL( "bye", entry->GetValue() );
+}
+
+void TextEntryTestCase::TextChangeEvents()
+{
+    class TextTestEventHandler : public wxEvtHandler
+    {
+    public:
+        TextTestEventHandler() { m_events = 0; }
+
+        // calling this automatically resets the events counter
+        int GetEvents()
+        {
+            const int events = m_events;
+            m_events = 0;
+            return events;
+        }
+
+        void OnText(wxCommandEvent& WXUNUSED(event)) { m_events++; }
+
+    private:
+        int m_events;
+    } handler;
+
+    GetTestWindow()->Connect
+                     (
+                        wxEVT_COMMAND_TEXT_UPDATED,
+                        wxCommandEventHandler(TextTestEventHandler::OnText),
+                        NULL,
+                        &handler
+                     );
+
+    wxTextEntry * const entry = GetTestEntry();
+
+    // notice that SetValue() generates an event even if the text didn't change
+    entry->SetValue("");
+    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
+
+    entry->SetValue("foo");
+    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
+
+    entry->SetValue("foo");
+    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
+
+    entry->ChangeValue("bar");
+    CPPUNIT_ASSERT_EQUAL( 0, handler.GetEvents() );
+
+    entry->AppendText("bar");
+    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
+
+    entry->Replace(3, 6, "baz");
+    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
+
+    entry->Remove(0, 3);
+    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
+
+    entry->WriteText("foo");
+    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
+
+    entry->Clear();
+    CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
+}
+
+void TextEntryTestCase::AssertSelection(int from, int to, const char *sel)
+{
+    wxTextEntry * const entry = GetTestEntry();
+
+    CPPUNIT_ASSERT( entry->HasSelection() );
+
+    long fromReal,
+         toReal;
+    entry->GetSelection(&fromReal, &toReal);
+    CPPUNIT_ASSERT_EQUAL( from, fromReal );
+    CPPUNIT_ASSERT_EQUAL( to, toReal );
+    CPPUNIT_ASSERT_EQUAL( sel, entry->GetStringSelection() );
+
+    CPPUNIT_ASSERT_EQUAL( from, entry->GetInsertionPoint() );
+}
+
+void TextEntryTestCase::Selection()
+{
+    wxTextEntry * const entry = GetTestEntry();
+
+    entry->SetValue("0123456789");
+
+    entry->SetSelection(2, 4);
+    AssertSelection(2, 4, "23"); // not "234"!
+
+    entry->SetSelection(3, -1);
+    AssertSelection(3, 10, "3456789");
+
+    entry->SelectAll();
+    AssertSelection(0, 10, "0123456789");
+
+    entry->SetSelection(0, 0);
+    CPPUNIT_ASSERT( !entry->HasSelection() );
+}
+
+void TextEntryTestCase::InsertionPoint()
+{
+    wxTextEntry * const entry = GetTestEntry();
+
+    CPPUNIT_ASSERT_EQUAL( 0, entry->GetLastPosition() );
+    CPPUNIT_ASSERT_EQUAL( 0, entry->GetInsertionPoint() );
+
+    entry->SetValue("0"); // should put the insertion point in front
+    CPPUNIT_ASSERT_EQUAL( 1, entry->GetLastPosition() );
+    CPPUNIT_ASSERT_EQUAL( 0, entry->GetInsertionPoint() );
+
+    entry->AppendText("12"); // should update the insertion point position
+    CPPUNIT_ASSERT_EQUAL( 3, entry->GetLastPosition() );
+    CPPUNIT_ASSERT_EQUAL( 3, entry->GetInsertionPoint() );
+
+    entry->SetInsertionPoint(1);
+    CPPUNIT_ASSERT_EQUAL( 3, entry->GetLastPosition() );
+    CPPUNIT_ASSERT_EQUAL( 1, entry->GetInsertionPoint() );
+
+    entry->SetInsertionPointEnd();
+    CPPUNIT_ASSERT_EQUAL( 3, entry->GetInsertionPoint() );
+
+    entry->SetInsertionPoint(0);
+    entry->WriteText("-"); // should move it after the written text
+    CPPUNIT_ASSERT_EQUAL( 4, entry->GetLastPosition() );
+    CPPUNIT_ASSERT_EQUAL( 1, entry->GetInsertionPoint() );
+}
+
diff --git a/tests/controls/textentrytest.h b/tests/controls/textentrytest.h
new file mode 100644 (file)
index 0000000..db4058c
--- /dev/null
@@ -0,0 +1,55 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        tests/controls/textentrytest.h
+// Purpose:     Base class implementing wxTextEntry unit tests
+// Author:      Vadim Zeitlin
+// Created:     2008-09-19 (extracted from textctrltest.cpp)
+// RCS-ID:      $Id$
+// Copyright:   (c) 2007, 2008 Vadim Zeitlin <vadim@wxwidgets.org>
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_TESTS_CONTROLS_TEXTENTRYTEST_H_
+#define _WX_TESTS_CONTROLS_TEXTENTRYTEST_H_
+
+// ----------------------------------------------------------------------------
+// abstract base class testing wxTextEntry methods
+// ----------------------------------------------------------------------------
+
+class TextEntryTestCase : public CppUnit::TestCase
+{
+public:
+    TextEntryTestCase() { }
+
+protected:
+    // this function must be overridden by the derived classes to return the
+    // text entry object we're testing, typically this is done by creating a
+    // control implementing wxTextEntry interface in setUp() virtual method and
+    // just returning it from here
+    virtual wxTextEntry *GetTestEntry() const = 0;
+
+    // and this one must be overridden to return the window which implements
+    // wxTextEntry interface -- usually it will return the same pointer as
+    // GetTestEntry(), just as a different type
+    virtual wxWindow *GetTestWindow() const = 0;
+
+    // this should be inserted in the derived class CPPUNIT_TEST_SUITE
+    // definition to run all wxTextEntry tests as part of it
+    #define wxTEXT_ENTRY_TESTS() \
+        CPPUNIT_TEST( SetValue ); \
+        CPPUNIT_TEST( TextChangeEvents ); \
+        CPPUNIT_TEST( Selection ); \
+        CPPUNIT_TEST( InsertionPoint )
+
+    void SetValue();
+    void TextChangeEvents();
+    void Selection();
+    void InsertionPoint();
+
+private:
+    // Selection() test helper: verify that selection is as described by the
+    // function parameters
+    void AssertSelection(int from, int to, const char *sel);
+
+    DECLARE_NO_COPY_CLASS(TextEntryTestCase)
+};
+
+#endif // _WX_TESTS_CONTROLS_TEXTENTRYTEST_H_
index 8502a506c7623695d195c4038f89d8f403e78d20..8fe46c44571805f062dc574abdeaeea4f482a9c8 100644 (file)
@@ -109,6 +109,7 @@ TEST_GUI_OBJECTS =  \
        $(OBJS)\test_gui_point.obj \
        $(OBJS)\test_gui_config.obj \
        $(OBJS)\test_gui_textctrltest.obj \
+       $(OBJS)\test_gui_textentrytest.obj \
        $(OBJS)\test_gui_rawbmp.obj \
        $(OBJS)\test_gui_selstoretest.obj \
        $(OBJS)\test_gui_clientsize.obj \
@@ -339,13 +340,13 @@ clean:
        -if exist $(OBJS)\printfbench.ils del $(OBJS)\printfbench.ils
 
 $(OBJS)\test.exe: $(OBJS)\test_dummy.obj  $(TEST_OBJECTS)
-       ilink32 -Tpe -q  -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO)  -L$(LIBDIRNAME) -ap $(CPPUNIT_LIBS) $(LDFLAGS) @&&|
+       ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO)  -L$(LIBDIRNAME) -ap $(CPPUNIT_LIBS) @&&|
        c0x32.obj $(TEST_OBJECTS),$@,, $(__WXLIB_NET_p)  $(__WXLIB_BASE_p)  $(__WXLIB_XML_p)  $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_1).lib,,
 |
 
 !if "$(USE_GUI)" == "1"
 $(OBJS)\test_gui.exe: $(OBJS)\test_gui_dummy.obj  $(TEST_GUI_OBJECTS)  $(OBJS)\test_gui_sample.res
-       ilink32 -Tpe -q  -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO)  -L$(LIBDIRNAME) $(CPPUNIT_LIBS) -ap $(LDFLAGS) @&&|
+       ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO)  -L$(LIBDIRNAME) $(CPPUNIT_LIBS) -ap @&&|
        c0x32.obj $(TEST_GUI_OBJECTS),$@,, $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_1).lib,, $(OBJS)\test_gui_sample.res
 |
 !endif
@@ -359,7 +360,7 @@ fr:
        for %f in (internat.po internat.mo) do if not exist $(OBJS)\intl\fr\%f copy .\intl\fr\%f $(OBJS)\intl\fr
 
 $(OBJS)\printfbench.exe: $(OBJS)\printfbench_dummy.obj  $(PRINTFBENCH_OBJECTS)
-       ilink32 -Tpe -q  -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO)  -L$(LIBDIRNAME) -ap $(CPPUNIT_LIBS) $(LDFLAGS) @&&|
+       ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO)  -L$(LIBDIRNAME) -ap $(CPPUNIT_LIBS) @&&|
        c0x32.obj $(PRINTFBENCH_OBJECTS),$@,, $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_1).lib,,
 |
 
@@ -561,6 +562,9 @@ $(OBJS)\test_gui_config.obj: .\config\config.cpp
 $(OBJS)\test_gui_textctrltest.obj: .\controls\textctrltest.cpp
        $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\textctrltest.cpp
 
+$(OBJS)\test_gui_textentrytest.obj: .\controls\textentrytest.cpp
+       $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\textentrytest.cpp
+
 $(OBJS)\test_gui_rawbmp.obj: .\image\rawbmp.cpp
        $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\image\rawbmp.cpp
 
index c1097990725f39def845c58849365648bfe829bb..62d89ad14458f18ad48fc669ba1fc4c550c77ad9 100644 (file)
@@ -12,7 +12,7 @@ include ../build/msw/config.gcc
 
 ### Variables: ###
 
-CPPDEPS = -MT$@ -MF$@.d -MD -MP
+CPPDEPS = -MT$@ -MF$@.d -MD
 WX_RELEASE_NODOT = 29
 COMPILER_PREFIX = gcc
 OBJS = \
@@ -102,6 +102,7 @@ TEST_GUI_OBJECTS =  \
        $(OBJS)\test_gui_point.o \
        $(OBJS)\test_gui_config.o \
        $(OBJS)\test_gui_textctrltest.o \
+       $(OBJS)\test_gui_textentrytest.o \
        $(OBJS)\test_gui_rawbmp.o \
        $(OBJS)\test_gui_selstoretest.o \
        $(OBJS)\test_gui_clientsize.o \
@@ -323,11 +324,11 @@ clean:
        -if exist $(OBJS)\printfbench.exe del $(OBJS)\printfbench.exe
 
 $(OBJS)\test.exe: $(TEST_OBJECTS)
-       $(CXX) -o $@ $(TEST_OBJECTS)  $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME)  $(CPPUNIT_LIBS) $(LDFLAGS)  $(__WXLIB_NET_p)  $(__WXLIB_BASE_p)  $(__WXLIB_XML_p)  $(__WXLIB_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
+       $(CXX) -o $@ $(TEST_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME)  $(CPPUNIT_LIBS)  $(__WXLIB_NET_p)  $(__WXLIB_BASE_p)  $(__WXLIB_XML_p)  $(__WXLIB_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
 
 ifeq ($(USE_GUI),1)
 $(OBJS)\test_gui.exe: $(TEST_GUI_OBJECTS) $(OBJS)\test_gui_sample_rc.o
-       $(CXX) -o $@ $(TEST_GUI_OBJECTS)  $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(CPPUNIT_LIBS)  $(LDFLAGS)  $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
+       $(CXX) -o $@ $(TEST_GUI_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(CPPUNIT_LIBS)   $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
 endif
 
 data: 
@@ -339,7 +340,7 @@ fr:
        for %%f in (internat.po internat.mo) do if not exist $(OBJS)\intl\fr\%%f copy .\intl\fr\%%f $(OBJS)\intl\fr
 
 $(OBJS)\printfbench.exe: $(PRINTFBENCH_OBJECTS)
-       $(CXX) -o $@ $(PRINTFBENCH_OBJECTS)  $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME)  $(CPPUNIT_LIBS) $(LDFLAGS)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
+       $(CXX) -o $@ $(PRINTFBENCH_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME)  $(CPPUNIT_LIBS)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
 
 $(OBJS)\test_dummy.o: ./dummy.cpp
        $(CXX) -c -o $@ $(TEST_CXXFLAGS) $(CPPDEPS) $<
@@ -539,6 +540,9 @@ $(OBJS)\test_gui_config.o: ./config/config.cpp
 $(OBJS)\test_gui_textctrltest.o: ./controls/textctrltest.cpp
        $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<
 
+$(OBJS)\test_gui_textentrytest.o: ./controls/textentrytest.cpp
+       $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<
+
 $(OBJS)\test_gui_rawbmp.o: ./image/rawbmp.cpp
        $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<
 
index 8f4f4627306310c981b8d4a4c0d2263603406d45..be79dd974f118a25902672907005060bfd26874e 100644 (file)
@@ -105,6 +105,7 @@ TEST_GUI_OBJECTS =  \
        $(OBJS)\test_gui_point.obj \
        $(OBJS)\test_gui_config.obj \
        $(OBJS)\test_gui_textctrltest.obj \
+       $(OBJS)\test_gui_textentrytest.obj \
        $(OBJS)\test_gui_rawbmp.obj \
        $(OBJS)\test_gui_selstoretest.obj \
        $(OBJS)\test_gui_clientsize.obj \
@@ -424,13 +425,13 @@ clean:
        -if exist $(OBJS)\printfbench.pdb del $(OBJS)\printfbench.pdb
 
 $(OBJS)\test.exe: $(OBJS)\test_dummy.obj  $(TEST_OBJECTS)
-       link /NOLOGO /OUT:$@  $(__DEBUGINFO_2) /pdb:"$(OBJS)\test.pdb"  $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE $(CPPUNIT_LIBS) $(LDFLAGS) @<<
+       link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_2) /pdb:"$(OBJS)\test.pdb"  $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE $(CPPUNIT_LIBS) @<<
        $(TEST_OBJECTS)  $(__WXLIB_NET_p)  $(__WXLIB_BASE_p)  $(__WXLIB_XML_p)  $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib
 <<
 
 !if "$(USE_GUI)" == "1"
 $(OBJS)\test_gui.exe: $(OBJS)\test_gui_dummy.obj  $(TEST_GUI_OBJECTS) $(OBJS)\test_gui_sample.res
-       link /NOLOGO /OUT:$@  $(__DEBUGINFO_2) /pdb:"$(OBJS)\test_gui.pdb"  $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(CPPUNIT_LIBS) /SUBSYSTEM:CONSOLE $(LDFLAGS) @<<
+       link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_2) /pdb:"$(OBJS)\test_gui.pdb"  $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(CPPUNIT_LIBS) /SUBSYSTEM:CONSOLE @<<
        $(TEST_GUI_OBJECTS)  $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib
 <<
 !endif
@@ -444,7 +445,7 @@ fr:
        for %f in (internat.po internat.mo) do if not exist $(OBJS)\intl\fr\%f copy .\intl\fr\%f $(OBJS)\intl\fr
 
 $(OBJS)\printfbench.exe: $(OBJS)\printfbench_dummy.obj  $(PRINTFBENCH_OBJECTS)
-       link /NOLOGO /OUT:$@  $(__DEBUGINFO_2) /pdb:"$(OBJS)\printfbench.pdb"  $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE $(CPPUNIT_LIBS) $(LDFLAGS) @<<
+       link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_2) /pdb:"$(OBJS)\printfbench.pdb"  $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE $(CPPUNIT_LIBS) @<<
        $(PRINTFBENCH_OBJECTS)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib
 <<
 
@@ -646,6 +647,9 @@ $(OBJS)\test_gui_config.obj: .\config\config.cpp
 $(OBJS)\test_gui_textctrltest.obj: .\controls\textctrltest.cpp
        $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\textctrltest.cpp
 
+$(OBJS)\test_gui_textentrytest.obj: .\controls\textentrytest.cpp
+       $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\textentrytest.cpp
+
 $(OBJS)\test_gui_rawbmp.obj: .\image\rawbmp.cpp
        $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\image\rawbmp.cpp
 
index 03a2a488410b9d4edb165eb54d771037eedb80b7..02c28229c05c376ca340ae2f2bcfda5b798b2d49 100644 (file)
@@ -314,6 +314,7 @@ TEST_GUI_OBJECTS =  &
        $(OBJS)\test_gui_point.obj &
        $(OBJS)\test_gui_config.obj &
        $(OBJS)\test_gui_textctrltest.obj &
+       $(OBJS)\test_gui_textentrytest.obj &
        $(OBJS)\test_gui_rawbmp.obj &
        $(OBJS)\test_gui_selstoretest.obj &
        $(OBJS)\test_gui_clientsize.obj &
@@ -353,7 +354,7 @@ $(OBJS)\test.exe :  $(TEST_OBJECTS)
        @%append $(OBJS)\test.lbc option quiet
        @%append $(OBJS)\test.lbc name $^@
        @%append $(OBJS)\test.lbc option caseexact
-       @%append $(OBJS)\test.lbc  $(__DEBUGINFO_2)  libpath $(LIBDIRNAME) system nt ref 'main_' $(CPPUNIT_LIBS) $(LDFLAGS)
+       @%append $(OBJS)\test.lbc $(LDFLAGS) $(__DEBUGINFO_2)  libpath $(LIBDIRNAME) system nt ref 'main_' $(CPPUNIT_LIBS)
        @for %i in ($(TEST_OBJECTS)) do @%append $(OBJS)\test.lbc file %i
        @for %i in ( $(__WXLIB_NET_p)  $(__WXLIB_BASE_p)  $(__WXLIB_XML_p)  $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE)  $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib) do @%append $(OBJS)\test.lbc library %i
        @%append $(OBJS)\test.lbc
@@ -366,7 +367,7 @@ $(OBJS)\test_gui.exe :  $(TEST_GUI_OBJECTS) $(OBJS)\test_gui_sample.res
        @%append $(OBJS)\test_gui.lbc option quiet
        @%append $(OBJS)\test_gui.lbc name $^@
        @%append $(OBJS)\test_gui.lbc option caseexact
-       @%append $(OBJS)\test_gui.lbc  $(__DEBUGINFO_2)  libpath $(LIBDIRNAME) $(CPPUNIT_LIBS) system nt ref 'main_' $(LDFLAGS)
+       @%append $(OBJS)\test_gui.lbc $(LDFLAGS) $(__DEBUGINFO_2)  libpath $(LIBDIRNAME) $(CPPUNIT_LIBS) system nt ref 'main_'
        @for %i in ($(TEST_GUI_OBJECTS)) do @%append $(OBJS)\test_gui.lbc file %i
        @for %i in ( $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE)  $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib) do @%append $(OBJS)\test_gui.lbc library %i
        @%append $(OBJS)\test_gui.lbc option resource=$(OBJS)\test_gui_sample.res
@@ -387,7 +388,7 @@ $(OBJS)\printfbench.exe :  $(PRINTFBENCH_OBJECTS)
        @%append $(OBJS)\printfbench.lbc option quiet
        @%append $(OBJS)\printfbench.lbc name $^@
        @%append $(OBJS)\printfbench.lbc option caseexact
-       @%append $(OBJS)\printfbench.lbc  $(__DEBUGINFO_2)  libpath $(LIBDIRNAME) system nt ref 'main_' $(CPPUNIT_LIBS) $(LDFLAGS)
+       @%append $(OBJS)\printfbench.lbc $(LDFLAGS) $(__DEBUGINFO_2)  libpath $(LIBDIRNAME) system nt ref 'main_' $(CPPUNIT_LIBS)
        @for %i in ($(PRINTFBENCH_OBJECTS)) do @%append $(OBJS)\printfbench.lbc file %i
        @for %i in ( $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE)  $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib) do @%append $(OBJS)\printfbench.lbc library %i
        @%append $(OBJS)\printfbench.lbc
@@ -592,6 +593,9 @@ $(OBJS)\test_gui_config.obj :  .AUTODEPEND .\config\config.cpp
 $(OBJS)\test_gui_textctrltest.obj :  .AUTODEPEND .\controls\textctrltest.cpp
        $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<
 
+$(OBJS)\test_gui_textentrytest.obj :  .AUTODEPEND .\controls\textentrytest.cpp
+       $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<
+
 $(OBJS)\test_gui_rawbmp.obj :  .AUTODEPEND .\image\rawbmp.cpp
        $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<
 
index d66a473b50c7d07e8e38ee2d5f62dcdf06ec8d5a..d1e62e674da82c786bb9527e4b5ac2abc8745444 100644 (file)
             geometry/point.cpp
             config/config.cpp
             controls/textctrltest.cpp
+            controls/textentrytest.cpp
             image/rawbmp.cpp
             misc/selstoretest.cpp
             window/clientsize.cpp
index 807fa7ad9413ba3f09cf0abd7c1a5b0b732e5a4d..d180fba8729a2adefc608479c55f25b129f25c12 100644 (file)
@@ -283,6 +283,10 @@ SOURCE=.\test.cpp
 \r
 SOURCE=.\controls\textctrltest.cpp\r
 # End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\controls\textentrytest.cpp\r
+# End Source File\r
 # End Group\r
 # End Target\r
 # End Project\r
index 9969813b0fd5b57ec6cb76bae93f827d2ef041b5..43431002384440458081a2af241c05b4abf8ae92 100644 (file)
                                RelativePath=".\test.cpp"/>\r
                        <File\r
                                RelativePath=".\controls\textctrltest.cpp"/>\r
+                       <File\r
+                               RelativePath=".\controls\textentrytest.cpp"/>\r
                </Filter>\r
                <Filter\r
                        Name="Resource Files"\r
index 6a94cea24da19c3b58e3aacf57bb061e2799613e..f03ef388f2382b21e7dacbea7375a1b842519c07 100644 (file)
                        <File\r
                                RelativePath=".\controls\textctrltest.cpp"\r
                        />\r
+                       <File\r
+                               RelativePath=".\controls\textentrytest.cpp"\r
+                       />\r
                </Filter>\r
                <Filter\r
                        Name="Resource Files"\r