nux-1.14.0
test-system.cpp
00001 /*
00002  * Copyright 2010 Inalogic Inc.
00003  *
00004  * This program is free software: you can redistribute it and/or modify it
00005  * under the terms of the GNU Lesser General Public License version 3, as
00006  * published by the  Free Software Foundation.
00007  *
00008  * This program is distributed in the hope that it will be useful, but
00009  * WITHOUT ANY WARRANTY; without even the implied warranties of
00010  * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
00011  * PURPOSE.  See the applicable version of the GNU Lesser General Public
00012  * License for more details.
00013  *
00014  * You should have received a copy of both the GNU Lesser General Public
00015  * License version 3 along with this program.  If not, see
00016  * <http://www.gnu.org/licenses/>
00017  *
00018  * Authored by: Jay Taoko <jaytaoko@inalogic.com>
00019  *
00020  */
00021 
00022 
00023 #include <glib.h>
00024 #include "Nux/Nux.h"
00025 #include "Nux/VLayout.h"
00026 #include "Nux/HLayout.h"
00027 #include "Nux/WindowThread.h"
00028 #include "Nux/Button.h"
00029 
00030 //static void TestMainWindow(void);
00031 //static void TestMainWindowStatus(void);
00032 //static void TestMainWindowSize(void);
00033 
00034 void TestSystemSuite (void)
00035 {
00036 #define TESTDOMAIN "/System/"
00037 
00038 //  g_test_add_func (TESTDOMAIN"/TestMainWindow",       TestMainWindow);
00039 //  g_test_add_func (TESTDOMAIN"/TestMainWindowStatus", TestMainWindowStatus);
00040 //  g_test_add_func (TESTDOMAIN"/TestMainWindowSize",   TestMainWindowSize);
00041 }
00042 
00043 /*
00044 static void TestMainWindow (void)
00045 {
00046   // Warning: on windows the window can not be physically smaller than ~120x100
00047   nux::WindowThread* wt = nux::CreateGUIThread(TEXT("TestMainWindow"), 120, 100, 0, 0, 0);
00048 
00049   g_assert (wt != 0);
00050   g_assert (nux::GetGraphicsThread () == wt);
00051 
00052   delete wt;
00053 }
00054 
00055 
00056 static void TestMainWindowStatus (void)
00057 {
00058   // Warning: on windows the window can not be physically smaller than ~120x100
00059   nux::WindowThread* wt = nux::CreateGUIThread(TEXT("TestMainWindowStatus"), 120, 100, 0, 0, 0);
00060 
00061   g_assert (wt != 0);
00062   g_assert (nux::GetGraphicsThread () == wt);
00063 
00064   //g_assert (nux::GetWindow ().IsWindowVisible () == false);
00065 
00066   //nux::GetWindow ().ShowWindow ();
00067 
00068   //g_assert (nux::GetWindow ().IsWindowVisible () == true);
00069 
00070   //nux::GetWindow ().HideWindow ();
00071 
00072   //g_assert (nux::GetWindow ().IsWindowVisible () == false);
00073 
00074   delete wt;
00075 }
00076 
00077 static void TestMainWindowSize (void)
00078 {
00079   // Warning: on windows the window can not be physically smaller than ~120x100
00080   nux::WindowThread* wt = nux::CreateGUIThread(TEXT("TestMainWindowSize"), 120, 100, 0, 0, 0);
00081 
00082   nux::GetWindow ().ShowWindow ();
00083 
00084   g_assert (wt != 0);
00085   g_assert (nux::GetGraphicsThread () == wt);
00086   g_assert (nux::GetWindow ().GetWindowWidth () == 120);
00087   g_assert (nux::GetWindow ().GetWindowHeight () == 100);
00088 
00089   delete wt;
00090 }*/
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends