TS 67 CNDMacroSupport
C/C++ Pack Test Specification for Macro support
Author: Valeriy Soldatov
Version: 0.2.1
Last update: 14.01.2014
Introduction: Test specification for Macro support in NetBeans 7.4 C/C++ Pack
Contents |
Test suite: Macro support
Purpose: Verify Macro support in NetBeans C/C++ Pack 7.4
Comment: -
- Check tooltip
- New Project > C/C++ > C/C++ Application
- Specify a project name and location
- Let the Create Main File check box checked (File name is 'main')
- Select "C" language
- Press Finish button
- Open main.c file in built-in editor
- Find 'return (EXIT_SUCCESS);' line
- Press Ctrl-Alt and move cursor on 'EXIT_SUCCESS' string
- EXPECTED RESULT: Tooltip is appeared. And it contains such text:
EXIT_SUCCESS
Expands to:
0
- Check 'Navigate
- New Project > C/C++ > C/C++ Application
- Specify a project name and location
- Let the Create Main File check box checked (File name is 'main')
- Select "C" language
- Press Finish button
- Open main.c file in built-in editor
- Find 'return (EXIT_SUCCESS);' line
- Call context menu on 'EXIT_SUCCESS' string. Select 'Navigate | View Macro Expansion' context menu item
- EXPECTED RESULT: 'Macro Expansion' tab should be opened. 'return (0);' line should be displayed in it.
- Check Ctrl-Alt-Click shortcut
- New Project > C/C++ > C/C++ Application
- Specify a project name and location
- Let the Create Main File check box checked (File name is 'main')
- Select "C" language
- Press Finish button
- Open main.c file in built-in editor
- Find 'return (EXIT_SUCCESS);' line
- Press Ctrl-Alt-Mouse's click
- EXPECTED RESULT: Such text should be displayed in 'Macro Expansion' tab:
int main(int argc, char** argv) {
return (0);
}
- Check 'Expand whole file' button
- New Project > C/C++ > C/C++ Application
- Specify a project name and location
- Let the Create Main File check box checked (File name is 'main')
- Select "C" language
- Press Finish button
- Open main.c file in built-in editor
- Find 'return (EXIT_SUCCESS);' line
- Press Ctrl-Alt-Mouse's click
- Press 'Expand whole file' button in 'Macro Expansion' tab
- EXPECTED RESULT: In editor and in 'Macro Expansion' tab files are differ in 1 line only. 'return (EXIT_SUCCESS);' should be in editor. 'return (0);' should be in 'Macro Expansion' tab
- Check 'Synchronize caret, content and context' toggle button
- New Project > C/C++ > C/C++ Application
- Specify a project name and location
- Let the Create Main File check box checked (File name is 'main')
- Select "C" language
- Press Finish button
- Open main.c file in built-in editor
- Find 'return (EXIT_SUCCESS);' line
- Press Ctrl-Alt-Mouse's click
- Click on 'int main(int argc, char** argv) {' line in 'Macro Expansion' tab
==> 'int main(int argc, char** argv) {' is selected in built-in editor also - Switch off 'Synchronize caret, content and context' toggle button in 'Macro Expansion' tab
- Click on 'return (0);' line in 'Macro Expansion' tab
- EXPECTED RESULT: 'int main(int argc, char** argv) {' is selected in built-in editor
- Check 'Next macro' and 'Previous macro' buttons
- New Project > C/C++ > C/C++ Application
- Specify a project name and location
- Let the Create Main File check box checked (File name is 'main')
- Select "C" language
- Press Finish button
- Open main.c file in built-in editor
- Replace code in this file on:
#include <stdio.h>
#include <stdlib.h>
#define SQR(x) x*x
#define SUM(x) x + x + x + x
int main(int argc, char** argv) {
int v = 0;
SUM(v);
SQR(v);
return (EXIT_SUCCESS);
} - Find 'return (EXIT_SUCCESS);' line
- Press Ctrl-Alt-Mouse's click
- Move cursor in 'Macro Expansion' tab on 'int main(int argc, char** argv) {' line
- Press 'Go to the next macro' button 3 times. Press 'Go to the previous macro' button 2 times
- EXPECTED RESULT: Cursor in 'Macro Expansion' tab jumps on next/previous macro
- Check tooltip in 'Macro Expansion' tab
- New Project > C/C++ > C/C++ Application
- Specify a project name and location
- Let the Create Main File check box checked (File name is 'main')
- Select "C" language
- Press Finish button
- Open main.c file in built-in editor
- Replace code in this file on:
#include <stdio.h>
#include <stdlib.h>
#define SQR(x) x*x
#define SUM(x) x + x + x + x
int main(int argc, char** argv) {
int v = 0;
SUM(SQR(v));
return (EXIT_SUCCESS);
} - Find 'return (EXIT_SUCCESS);' line
- Press Ctrl-Alt-Mouse's click
- Press Ctrl button and move cursor on 'v' variable in 'Macro Expansion' tab (in 'v + v + ...' line )
- EXPECTED RESULT: Tooltip appeared. Tooltip contains such text:
Variable v
int v