diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-04-13 16:26:44 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-04-13 16:26:44 -0600 |
commit | 638c1a6dc07b438efa220c5345e94c3a963505ca (patch) | |
tree | 85feed8dbf4f2dd7a2eec83ed88606f14a2f02a2 /NxWidgets/UnitTests | |
parent | 43ec94a665e13552402ff4f102e0f65f6792cf29 (diff) | |
download | px4-nuttx-638c1a6dc07b438efa220c5345e94c3a963505ca.tar.gz px4-nuttx-638c1a6dc07b438efa220c5345e94c3a963505ca.tar.bz2 px4-nuttx-638c1a6dc07b438efa220c5345e94c3a963505ca.zip |
More trailing whilespace removal
Diffstat (limited to 'NxWidgets/UnitTests')
27 files changed, 104 insertions, 104 deletions
diff --git a/NxWidgets/UnitTests/CButton/Makefile b/NxWidgets/UnitTests/CButton/Makefile index 1547c705e..4b31857a1 100644 --- a/NxWidgets/UnitTests/CButton/Makefile +++ b/NxWidgets/UnitTests/CButton/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CButtonArray/Makefile b/NxWidgets/UnitTests/CButtonArray/Makefile index 535ceb948..22d2390c3 100644 --- a/NxWidgets/UnitTests/CButtonArray/Makefile +++ b/NxWidgets/UnitTests/CButtonArray/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx b/NxWidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx index 824ae22c4..b9bb47a4b 100644 --- a/NxWidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx +++ b/NxWidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx @@ -67,7 +67,7 @@ static unsigned int g_mmPrevious; static unsigned int g_mmPeak; static FAR const char *g_buttonLabels[BUTTONARRAY_NCOLUMNS*BUTTONARRAY_NROWS] = { - "=>", "A", "B", "<DEL", + "=>", "A", "B", "<DEL", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", @@ -285,7 +285,7 @@ int cbuttonarray_main(int argc, char *argv[]) int clickRow; if (buttonArray->isButtonClicked(clickColumn, clickRow)) { - printf("cbuttonarray_main: %s: Button (%d, %d) is clicked\n", + printf("cbuttonarray_main: %s: Button (%d, %d) is clicked\n", clickColumn == i && clickRow == j ? "OK" : "ERROR", clickColumn, clickRow); } @@ -304,10 +304,10 @@ int cbuttonarray_main(int argc, char *argv[]) test->poll(buttonArray); if (buttonArray->isButtonClicked(clickColumn, clickRow)) { - printf("cbuttonarray_main: ERROR: Button (%d, %d) is clicked\n", + printf("cbuttonarray_main: ERROR: Button (%d, %d) is clicked\n", clickColumn, clickRow); } - + usleep(500*1000); } } diff --git a/NxWidgets/UnitTests/CCheckBox/Makefile b/NxWidgets/UnitTests/CCheckBox/Makefile index e2f6a051a..bc7c2da6d 100644 --- a/NxWidgets/UnitTests/CCheckBox/Makefile +++ b/NxWidgets/UnitTests/CCheckBox/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CGlyphButton/Makefile b/NxWidgets/UnitTests/CGlyphButton/Makefile index f0ebfa8b6..4e0975e9b 100644 --- a/NxWidgets/UnitTests/CGlyphButton/Makefile +++ b/NxWidgets/UnitTests/CGlyphButton/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CImage/Makefile b/NxWidgets/UnitTests/CImage/Makefile index f6416372f..7fc9cd9af 100644 --- a/NxWidgets/UnitTests/CImage/Makefile +++ b/NxWidgets/UnitTests/CImage/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CKeypad/Makefile b/NxWidgets/UnitTests/CKeypad/Makefile index ea5b0fb15..28571f2b2 100644 --- a/NxWidgets/UnitTests/CKeypad/Makefile +++ b/NxWidgets/UnitTests/CKeypad/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CKeypad/ckeypad_main.cxx b/NxWidgets/UnitTests/CKeypad/ckeypad_main.cxx index 0b246683a..c103da9ed 100644 --- a/NxWidgets/UnitTests/CKeypad/ckeypad_main.cxx +++ b/NxWidgets/UnitTests/CKeypad/ckeypad_main.cxx @@ -155,7 +155,7 @@ static void clickButtons(CKeypadTest *test, CKeypad *keypad) int clickRow; if (keypad->isButtonClicked(clickColumn, clickRow)) { - printf("clickButtons: %s: Button (%d, %d) is clicked\n", + printf("clickButtons: %s: Button (%d, %d) is clicked\n", clickColumn == i && clickRow == j ? "OK" : "ERROR", clickColumn, clickRow); } @@ -174,10 +174,10 @@ static void clickButtons(CKeypadTest *test, CKeypad *keypad) test->poll(keypad); if (keypad->isButtonClicked(clickColumn, clickRow)) { - printf("clickButtons: ERROR: Button (%d, %d) is clicked\n", + printf("clickButtons: ERROR: Button (%d, %d) is clicked\n", clickColumn, clickRow); } - + usleep(500*1000); } } diff --git a/NxWidgets/UnitTests/CKeypad/ckeypadtest.cxx b/NxWidgets/UnitTests/CKeypad/ckeypadtest.cxx index 300148cc3..62e01a93c 100644 --- a/NxWidgets/UnitTests/CKeypad/ckeypadtest.cxx +++ b/NxWidgets/UnitTests/CKeypad/ckeypadtest.cxx @@ -221,7 +221,7 @@ void CKeypadTest::setDisplaySize(void) m_buttonWidth = windowSize.w >> 2; } - + // Lets aim for a height of 7*32 = 224. But lets bump up the number of rows // to allow one for the text box. @@ -340,7 +340,7 @@ void CKeypadTest::showKeypad(CKeypad *keypad) keypad->redraw(); // Then redraw the text box - + m_textbox->enable(); // Un-necessary, the widget is enabled by default m_textbox->enableDrawing(); m_textbox->redraw(); diff --git a/NxWidgets/UnitTests/CLabel/Makefile b/NxWidgets/UnitTests/CLabel/Makefile index 906e4754d..44c21b801 100644 --- a/NxWidgets/UnitTests/CLabel/Makefile +++ b/NxWidgets/UnitTests/CLabel/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CLatchButton/Makefile b/NxWidgets/UnitTests/CLatchButton/Makefile index 131a96f7a..5dde0324c 100644 --- a/NxWidgets/UnitTests/CLatchButton/Makefile +++ b/NxWidgets/UnitTests/CLatchButton/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CLatchButtonArray/Makefile b/NxWidgets/UnitTests/CLatchButtonArray/Makefile index c712142e3..1280727e9 100644 --- a/NxWidgets/UnitTests/CLatchButtonArray/Makefile +++ b/NxWidgets/UnitTests/CLatchButtonArray/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarray_main.cxx b/NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarray_main.cxx index 7ffb9cadc..1b038412c 100644 --- a/NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarray_main.cxx +++ b/NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarray_main.cxx @@ -67,7 +67,7 @@ static unsigned int g_mmPrevious; static unsigned int g_mmPeak; static FAR const char *g_buttonLabels[BUTTONARRAY_NCOLUMNS*BUTTONARRAY_NROWS] = { - "=>", "A", "B", "<DEL", + "=>", "A", "B", "<DEL", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", @@ -243,12 +243,12 @@ int clatchbuttonarray_main(int argc, char *argv[]) bool clicked = false; bool latched = false; - + for (int j = 0; j < BUTTONARRAY_NROWS; j++) { for (int i = 0; i < BUTTONARRAY_NCOLUMNS; i++) { - // Initially, this button should be neither clicked nor latched + // Initially, this button should be neither clicked nor latched clicked = false; latched = false; @@ -275,7 +275,7 @@ int clatchbuttonarray_main(int argc, char *argv[]) // Poll for the mouse release event (of course this can hang if something fails) test->poll(buttonArray); - + // Now it should be un-clicked and latched clicked = false; diff --git a/NxWidgets/UnitTests/CListBox/Makefile b/NxWidgets/UnitTests/CListBox/Makefile index 5647002d6..b30278cc3 100644 --- a/NxWidgets/UnitTests/CListBox/Makefile +++ b/NxWidgets/UnitTests/CListBox/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CListBox/clistbox_main.cxx b/NxWidgets/UnitTests/CListBox/clistbox_main.cxx index e97bb8b50..5bbcb1da5 100644 --- a/NxWidgets/UnitTests/CListBox/clistbox_main.cxx +++ b/NxWidgets/UnitTests/CListBox/clistbox_main.cxx @@ -297,7 +297,7 @@ int clistbox_main(int argc, char *argv[]) message("clistbox_main: %s: %d options de-selected\n", count == 5 ? "OK" : "ERROR", count); updateMemoryUsage(g_mmPrevious, "clistbox_main: After de-selecting options"); - + message("clistbox_main: Removing the selected options\n"); for (int i = 0; i < 5; i++) { diff --git a/NxWidgets/UnitTests/CProgressBar/Makefile b/NxWidgets/UnitTests/CProgressBar/Makefile index 90e09db72..d05b7311a 100644 --- a/NxWidgets/UnitTests/CProgressBar/Makefile +++ b/NxWidgets/UnitTests/CProgressBar/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CRadioButton/Makefile b/NxWidgets/UnitTests/CRadioButton/Makefile index c64cf008c..a977b4e95 100644 --- a/NxWidgets/UnitTests/CRadioButton/Makefile +++ b/NxWidgets/UnitTests/CRadioButton/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CRadioButton/cradiobuttontest.cxx b/NxWidgets/UnitTests/CRadioButton/cradiobuttontest.cxx index 09b5af8c2..5c1d2966e 100644 --- a/NxWidgets/UnitTests/CRadioButton/cradiobuttontest.cxx +++ b/NxWidgets/UnitTests/CRadioButton/cradiobuttontest.cxx @@ -212,7 +212,7 @@ CRadioButton *CRadioButtonTest::newRadioButton(void) { // Start the radio button group in the center of the upper, left // quadrant. The initial size is 0,0 and the default style is used. - + nxgl_coord_t groupX = windowSize.w >> 2; nxgl_coord_t groupY = windowSize.h >> 2; diff --git a/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile b/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile index cf7bf3724..5a7038790 100644 --- a/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile +++ b/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CScrollbarVertical/Makefile b/NxWidgets/UnitTests/CScrollbarVertical/Makefile index 39a5d8528..290e9736c 100644 --- a/NxWidgets/UnitTests/CScrollbarVertical/Makefile +++ b/NxWidgets/UnitTests/CScrollbarVertical/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CSliderHorizonal/Makefile b/NxWidgets/UnitTests/CSliderHorizonal/Makefile index d824ffe93..3d4881d03 100644 --- a/NxWidgets/UnitTests/CSliderHorizonal/Makefile +++ b/NxWidgets/UnitTests/CSliderHorizonal/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CSliderVertical/Makefile b/NxWidgets/UnitTests/CSliderVertical/Makefile index a0b33a3ac..1fc39d29a 100644 --- a/NxWidgets/UnitTests/CSliderVertical/Makefile +++ b/NxWidgets/UnitTests/CSliderVertical/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CTextBox/Makefile b/NxWidgets/UnitTests/CTextBox/Makefile index 94cddcc9f..3d96662a6 100644 --- a/NxWidgets/UnitTests/CTextBox/Makefile +++ b/NxWidgets/UnitTests/CTextBox/Makefile @@ -87,7 +87,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend context disclean chkcxx chklib diff --git a/NxWidgets/UnitTests/CTextBox/ctextbox_main.cxx b/NxWidgets/UnitTests/CTextBox/ctextbox_main.cxx index c4f8c65b8..aaa96aff6 100644 --- a/NxWidgets/UnitTests/CTextBox/ctextbox_main.cxx +++ b/NxWidgets/UnitTests/CTextBox/ctextbox_main.cxx @@ -129,7 +129,7 @@ int ctextbox_main(int argc, char *argv[]) usleep(500*1000); test->injectChars(textbox, sizeof(string2), (FAR const uint8_t*)string2); - + // Clean up and exit sleep(2); diff --git a/NxWidgets/UnitTests/README.txt b/NxWidgets/UnitTests/README.txt index 3e5a21e7c..97f3eec7c 100644 --- a/NxWidgets/UnitTests/README.txt +++ b/NxWidgets/UnitTests/README.txt @@ -54,7 +54,7 @@ Installing and Building the Unit Tests Where: <nuttx-directory-path> is the full, absolute path to the NuttX build directory - + If you are using the sim/nsh2 or stm3210e-eval configurations, then skip to step 2 (Hmmm.. better check 1d) too). @@ -64,7 +64,7 @@ Installing and Building the Unit Tests "Unit Test Directories" b) Enable C++ Support - + If you are not using the sim/nsh2 or stm3210e-eval, you will need to add the following definitions to the NuttX configuration at nuttx/.config to enable C++ support: @@ -81,17 +81,17 @@ Installing and Building the Unit Tests enable debug symbols: CONFIG_DEBUG_SYMBOLS=y - + Then you can run the simulation using GDB or DDD which is a very powerful debugging environment! d) Special configuration requirements for the nxwm unit test: - + CONFIG_NXCONSOLE=y CONFIG_NX_MULTIUSER=y e) Other .config file changes -- NSH configurations only. - + If the configuration that you are using supports NSH and NSH built-in tasks then all is well. If it is an NSH configuration, then you will have to define the following in your nuttx/.config file as well (if it is not already defined): @@ -134,7 +134,7 @@ Installing and Building the Unit Tests The following step will then install the new, correct directory containing the user_start function for the selected unit test. If you see that NSH is configured: - + CONFIG_EXAMPLES_NSH=y ## DO NOT REMOVE Then go back and re-read e) above. @@ -148,7 +148,7 @@ Installing and Building the Unit Tests cd <nxwidgets-directory>/tools ./install.sh <apps-directory-path> <test-sub-directory> - + Where: <apps-directory-path> is the full, absolute path to the NuttX apps/ directory @@ -209,7 +209,7 @@ Build Issues $(ARCHCPUFLAGSXX) $(ARCHINCLUDESXX) $(ARCHDEFINES) $(EXTRADEFINES) -pipe 2. Stack Size Issues with the X11 Simulation - + When you run the NuttX simulation, it uses stacks allocated by NuttX from the NuttX heap. The memory management model is exactly the same in the simulation as it is real, target system. This is good because this produces a higher @@ -375,7 +375,7 @@ Example ./nuttx NuttShell (NSH) NuttX-6.9 - nsh> + nsh> b. Execute NuttX Where: NSH command prompt @@ -401,7 +401,7 @@ Example The I/O with the Linux/Cygwin simulation is blocking. So while NSH is waiting for input nothing can run (see configs/sim/README.txt for more info). One way to make NSH stop asking for input is to sleep. - + nsh> sleep 10 sleep 10 @@ -433,7 +433,7 @@ Example In order to debug, you have to have build with CONFIG_DEBUG_SYMBOLS=y. This setting is preselected in the sim/nsh2 configuration so that you don't have to do anything. - + Then under Linux or in a Cygwin X11 window, you can start the graphic debugger like: diff --git a/NxWidgets/UnitTests/TestStatus.txt b/NxWidgets/UnitTests/TestStatus.txt index 965f83ef7..25b3feba4 100644 --- a/NxWidgets/UnitTests/TestStatus.txt +++ b/NxWidgets/UnitTests/TestStatus.txt @@ -1,59 +1,59 @@ -NxWidgets Test Status
-=====================
-
-At this point, the NXWidgets GUI toolkit code complete but still not
-completely tested. This is a list of testing issues that still need to be
-addressed.
-
-The following Widgets have been have completed unit testing. The level of
-unit testing is, however, superficial. Many features have not yet been
-tested:
-
- - CLabel
- - CTextBox
- - CButton
- - CButtonArray
- - CKeypad
- - CRadioButton (and CRadioButtonGoup)
- - CGlyphButton
- - CLatchButton (and CStickyButton)
- - CLatchButtonArray (and CStickyButtonArray)
- - CCheckBox
- - CProgressBar
- - CImage
- - CSliderHorizontal (and CSliderHorizontalGrip)
- - CSliderVertical (and CSliderVerticalGrip)
- - CScrollBarHorizontal (except paging buttons)
- - CScrollBarVertical (except paging buttons)
-
-The following components have unit test in place, but do not successfully
-pass the test:
-
- - CListBox (and CListBoxDataItem) which also tests:
- o CText
- o CList and CListDataItem
- o CScrollingPanel
-
-The following no unit tests (and, hence, are probably non-functional):
-
- Infrastructure (won't have their own unit tests)
- - CScrollBarPanel
-
- Widgets that need unit tests:
- - CCycleButton
- - CScrollingTextBox
- - CMultiLineTextBox
- - CScrollingListBox
-
-There are things that require testing after all widgets complete their unit
-tests as well. As examples:
-
- - Need to verify that a screen with many widgets works correctly. That
- focus is correctly handled when widgets are removed. etc.
- - Need to verify that widget with many children work correctly together.
- - Need to verfiy that a display with many windows with multiple wigets
- per window works okay.
-
-Most unit-level testing was performed in a simulated environment driven by
-simulated mouse and keyboard input. So many features are not tested that
-require human interaction ... such grabbing and dragging scrollbars.
+NxWidgets Test Status +===================== + +At this point, the NXWidgets GUI toolkit code complete but still not +completely tested. This is a list of testing issues that still need to be +addressed. + +The following Widgets have been have completed unit testing. The level of +unit testing is, however, superficial. Many features have not yet been +tested: + + - CLabel + - CTextBox + - CButton + - CButtonArray + - CKeypad + - CRadioButton (and CRadioButtonGoup) + - CGlyphButton + - CLatchButton (and CStickyButton) + - CLatchButtonArray (and CStickyButtonArray) + - CCheckBox + - CProgressBar + - CImage + - CSliderHorizontal (and CSliderHorizontalGrip) + - CSliderVertical (and CSliderVerticalGrip) + - CScrollBarHorizontal (except paging buttons) + - CScrollBarVertical (except paging buttons) + +The following components have unit test in place, but do not successfully +pass the test: + + - CListBox (and CListBoxDataItem) which also tests: + o CText + o CList and CListDataItem + o CScrollingPanel + +The following no unit tests (and, hence, are probably non-functional): + + Infrastructure (won't have their own unit tests) + - CScrollBarPanel + + Widgets that need unit tests: + - CCycleButton + - CScrollingTextBox + - CMultiLineTextBox + - CScrollingListBox + +There are things that require testing after all widgets complete their unit +tests as well. As examples: + + - Need to verify that a screen with many widgets works correctly. That + focus is correctly handled when widgets are removed. etc. + - Need to verify that widget with many children work correctly together. + - Need to verfiy that a display with many windows with multiple wigets + per window works okay. + +Most unit-level testing was performed in a simulated environment driven by +simulated mouse and keyboard input. So many features are not tested that +require human interaction ... such grabbing and dragging scrollbars. diff --git a/NxWidgets/UnitTests/nxwm/Makefile b/NxWidgets/UnitTests/nxwm/Makefile index 1fa22348e..22fab3194 100644 --- a/NxWidgets/UnitTests/nxwm/Makefile +++ b/NxWidgets/UnitTests/nxwm/Makefile @@ -101,7 +101,7 @@ STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: chkcxx chklibnxwidgets chklibnxwm .built .PHONY: clean depend context disclean chkcxx chklibnxwidgets chklibnxwm |