test_gui_size.o \
test_gui_point.o \
test_gui_config.o \
- test_gui_clientsize.o \
test_gui_textctrltest.o \
- test_gui_selstoretest.o
+ test_gui_selstoretest.o \
+ test_gui_clientsize.o
TEST_GUI_ODEP = $(___pch_testprec_test_gui_testprec_h_gch___depname)
PRINTFBENCH_CXXFLAGS = $(__printfbench_PCH_INC) -D__WX$(TOOLKIT)__ \
$(__WXUNIV_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
test_gui_config.o: $(srcdir)/config/config.cpp $(TEST_GUI_ODEP)
$(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/config/config.cpp
-test_gui_clientsize.o: $(srcdir)/controls/clientsize.cpp $(TEST_GUI_ODEP)
- $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/clientsize.cpp
-
test_gui_textctrltest.o: $(srcdir)/controls/textctrltest.cpp $(TEST_GUI_ODEP)
$(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/textctrltest.cpp
test_gui_selstoretest.o: $(srcdir)/misc/selstoretest.cpp $(TEST_GUI_ODEP)
$(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/misc/selstoretest.cpp
+test_gui_clientsize.o: $(srcdir)/window/clientsize.cpp $(TEST_GUI_ODEP)
+ $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/window/clientsize.cpp
+
printfbench_printfbench.o: $(srcdir)/benchmarks/printfbench.cpp $(PRINTFBENCH_ODEP)
$(CXXC) -c -o $@ $(PRINTFBENCH_CXXFLAGS) $(srcdir)/benchmarks/printfbench.cpp
+++ /dev/null
-///////////////////////////////////////////////////////////////////////////////
-// Name: tests/controls/clientsize.cpp
-// Purpose: Client vs. window size handling unit test
-// Author: Vaclav Slavik
-// Created: 2008-02-12
-// RCS-ID: $Id$
-// Copyright: (c) 2008 Vaclav Slavik <vslavik@fastmail.fm>
-///////////////////////////////////////////////////////////////////////////////
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "testprec.h"
-
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
- #include "wx/app.h"
- #include "wx/window.h"
-#endif // WX_PRECOMP
-
-// ----------------------------------------------------------------------------
-// test class
-// ----------------------------------------------------------------------------
-
-class ClientSizeTestCase : public CppUnit::TestCase
-{
-public:
- ClientSizeTestCase() { }
-
- virtual void setUp();
- virtual void tearDown();
-
-private:
- CPPUNIT_TEST_SUITE( ClientSizeTestCase );
- CPPUNIT_TEST( ClientToWindow );
- CPPUNIT_TEST( WindowToClient );
- CPPUNIT_TEST_SUITE_END();
-
- void ClientToWindow();
- void WindowToClient();
-
- wxWindow *m_win;
-
- DECLARE_NO_COPY_CLASS(ClientSizeTestCase)
-};
-
-// register in the unnamed registry so that these tests are run by default
-CPPUNIT_TEST_SUITE_REGISTRATION( ClientSizeTestCase );
-
-// also include in it's own registry so that these tests can be run alone
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( ClientSizeTestCase, "ClientSizeTestCase" );
-
-// ----------------------------------------------------------------------------
-// test initialization
-// ----------------------------------------------------------------------------
-
-void ClientSizeTestCase::setUp()
-{
- m_win = wxTheApp->GetTopWindow();
-}
-
-void ClientSizeTestCase::tearDown()
-{
- m_win = NULL;
-}
-
-// ----------------------------------------------------------------------------
-// tests themselves
-// ----------------------------------------------------------------------------
-
-void ClientSizeTestCase::ClientToWindow()
-{
- CPPUNIT_ASSERT(m_win->GetSize() ==
- m_win->ClientToWindowSize(m_win->GetClientSize()));
-}
-
-void ClientSizeTestCase::WindowToClient()
-{
- CPPUNIT_ASSERT(m_win->GetClientSize() ==
- m_win->WindowToClientSize(m_win->GetSize()));
-}
$(OBJS)\test_gui_size.obj \
$(OBJS)\test_gui_point.obj \
$(OBJS)\test_gui_config.obj \
- $(OBJS)\test_gui_clientsize.obj \
$(OBJS)\test_gui_textctrltest.obj \
- $(OBJS)\test_gui_selstoretest.obj
+ $(OBJS)\test_gui_selstoretest.obj \
+ $(OBJS)\test_gui_clientsize.obj
PRINTFBENCH_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
$(__OPTIMIZEFLAG) $(__THREADSFLAG_1) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
$(OBJS)\test_gui_config.obj: .\config\config.cpp
$(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\config\config.cpp
-$(OBJS)\test_gui_clientsize.obj: .\controls\clientsize.cpp
- $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\clientsize.cpp
-
$(OBJS)\test_gui_textctrltest.obj: .\controls\textctrltest.cpp
$(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\textctrltest.cpp
$(OBJS)\test_gui_selstoretest.obj: .\misc\selstoretest.cpp
$(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\misc\selstoretest.cpp
+$(OBJS)\test_gui_clientsize.obj: .\window\clientsize.cpp
+ $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\window\clientsize.cpp
+
$(OBJS)\printfbench_dummy.obj: .\dummy.cpp
$(CXX) -q -c -P -o$@ $(PRINTFBENCH_CXXFLAGS) -H .\dummy.cpp
$(OBJS)\test_gui_size.o \
$(OBJS)\test_gui_point.o \
$(OBJS)\test_gui_config.o \
- $(OBJS)\test_gui_clientsize.o \
$(OBJS)\test_gui_textctrltest.o \
- $(OBJS)\test_gui_selstoretest.o
+ $(OBJS)\test_gui_selstoretest.o \
+ $(OBJS)\test_gui_clientsize.o
PRINTFBENCH_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \
$(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
$(OBJS)\test_gui_config.o: ./config/config.cpp
$(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<
-$(OBJS)\test_gui_clientsize.o: ./controls/clientsize.cpp
- $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<
-
$(OBJS)\test_gui_textctrltest.o: ./controls/textctrltest.cpp
$(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\test_gui_selstoretest.o: ./misc/selstoretest.cpp
$(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<
+$(OBJS)\test_gui_clientsize.o: ./window/clientsize.cpp
+ $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\printfbench_dummy.o: ./dummy.cpp
$(CXX) -c -o $@ $(PRINTFBENCH_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\test_gui_size.obj \
$(OBJS)\test_gui_point.obj \
$(OBJS)\test_gui_config.obj \
- $(OBJS)\test_gui_clientsize.obj \
$(OBJS)\test_gui_textctrltest.obj \
- $(OBJS)\test_gui_selstoretest.obj
+ $(OBJS)\test_gui_selstoretest.obj \
+ $(OBJS)\test_gui_clientsize.obj
PRINTFBENCH_CXXFLAGS = /M$(__RUNTIME_LIBS_38)$(__DEBUGRUNTIME) /DWIN32 \
$(__DEBUGINFO) /Fd$(OBJS)\printfbench.pdb $(____DEBUGRUNTIME) \
$(__OPTIMIZEFLAG) $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(OBJS)\test_gui_config.obj: .\config\config.cpp
$(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\config\config.cpp
-$(OBJS)\test_gui_clientsize.obj: .\controls\clientsize.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\clientsize.cpp
-
$(OBJS)\test_gui_textctrltest.obj: .\controls\textctrltest.cpp
$(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\textctrltest.cpp
$(OBJS)\test_gui_selstoretest.obj: .\misc\selstoretest.cpp
$(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\misc\selstoretest.cpp
+$(OBJS)\test_gui_clientsize.obj: .\window\clientsize.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\window\clientsize.cpp
+
$(OBJS)\printfbench_dummy.obj: .\dummy.cpp
$(CXX) /c /nologo /TP /Fo$@ $(PRINTFBENCH_CXXFLAGS) /Yctestprec.h .\dummy.cpp
$(OBJS)\test_gui_size.obj &
$(OBJS)\test_gui_point.obj &
$(OBJS)\test_gui_config.obj &
- $(OBJS)\test_gui_clientsize.obj &
$(OBJS)\test_gui_textctrltest.obj &
- $(OBJS)\test_gui_selstoretest.obj
+ $(OBJS)\test_gui_selstoretest.obj &
+ $(OBJS)\test_gui_clientsize.obj
PRINTFBENCH_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
$(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) &
$(OBJS)\test_gui_config.obj : .AUTODEPEND .\config\config.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<
-$(OBJS)\test_gui_clientsize.obj : .AUTODEPEND .\controls\clientsize.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<
-
$(OBJS)\test_gui_textctrltest.obj : .AUTODEPEND .\controls\textctrltest.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<
$(OBJS)\test_gui_selstoretest.obj : .AUTODEPEND .\misc\selstoretest.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<
+$(OBJS)\test_gui_clientsize.obj : .AUTODEPEND .\window\clientsize.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<
+
$(OBJS)\printfbench_dummy.obj : .AUTODEPEND .\dummy.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(PRINTFBENCH_CXXFLAGS) $<
geometry/size.cpp
geometry/point.cpp
config/config.cpp
- controls/clientsize.cpp
controls/textctrltest.cpp
misc/selstoretest.cpp
+ window/clientsize.cpp
</sources>
<wx-lib>core</wx-lib>
<wx-lib>base</wx-lib>
# PROP Default_Filter ""\r
# Begin Source File\r
\r
-SOURCE=.\controls\clientsize.cpp\r
+SOURCE=.\window\clientsize.cpp\r
# End Source File\r
# Begin Source File\r
\r
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx">\r
<File\r
- RelativePath=".\controls\clientsize.cpp"/>\r
+ RelativePath=".\window\clientsize.cpp"/>\r
<File\r
RelativePath=".\config\config.cpp"/>\r
<File\r
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
>\r
<File\r
- RelativePath=".\controls\clientsize.cpp"\r
+ RelativePath=".\window\clientsize.cpp"\r
/>\r
<File\r
RelativePath=".\config\config.cpp"\r
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Name: tests/controls/clientsize.cpp
+// Purpose: Client vs. window size handling unit test
+// Author: Vaclav Slavik
+// Created: 2008-02-12
+// RCS-ID: $Id$
+// Copyright: (c) 2008 Vaclav Slavik <vslavik@fastmail.fm>
+///////////////////////////////////////////////////////////////////////////////
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "testprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+ #include "wx/window.h"
+#endif // WX_PRECOMP
+
+// ----------------------------------------------------------------------------
+// test class
+// ----------------------------------------------------------------------------
+
+class ClientSizeTestCase : public CppUnit::TestCase
+{
+public:
+ ClientSizeTestCase() { }
+
+ virtual void setUp();
+ virtual void tearDown();
+
+private:
+ CPPUNIT_TEST_SUITE( ClientSizeTestCase );
+ CPPUNIT_TEST( ClientToWindow );
+ CPPUNIT_TEST( WindowToClient );
+ CPPUNIT_TEST_SUITE_END();
+
+ void ClientToWindow();
+ void WindowToClient();
+
+ wxWindow *m_win;
+
+ DECLARE_NO_COPY_CLASS(ClientSizeTestCase)
+};
+
+// register in the unnamed registry so that these tests are run by default
+CPPUNIT_TEST_SUITE_REGISTRATION( ClientSizeTestCase );
+
+// also include in it's own registry so that these tests can be run alone
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( ClientSizeTestCase, "ClientSizeTestCase" );
+
+// ----------------------------------------------------------------------------
+// test initialization
+// ----------------------------------------------------------------------------
+
+void ClientSizeTestCase::setUp()
+{
+ m_win = wxTheApp->GetTopWindow();
+}
+
+void ClientSizeTestCase::tearDown()
+{
+ m_win = NULL;
+}
+
+// ----------------------------------------------------------------------------
+// tests themselves
+// ----------------------------------------------------------------------------
+
+void ClientSizeTestCase::ClientToWindow()
+{
+ CPPUNIT_ASSERT(m_win->GetSize() ==
+ m_win->ClientToWindowSize(m_win->GetClientSize()));
+}
+
+void ClientSizeTestCase::WindowToClient()
+{
+ CPPUNIT_ASSERT(m_win->GetClientSize() ==
+ m_win->WindowToClientSize(m_win->GetSize()));
+}