TS 72 CNDMacroSupport

C/C++ Pack Test Specification for Macro support

Author: Valeriy Soldatov
Version: 0.2
Lastupdate: 04.04.2012
Introduction: Test specification for Macro support in NetBeans 7.2 C/C++ Pack

Contents


Test suite: Macro support

Purpose: Verify Macro support in NetBeans C/C++ Pack 7.2
Comment: -

  1. Check tooltip
    1. New Project > C/C++ > C/C++ Application
    2. Specify a project name and location
    3. Let the Create Main File check box checked (File name is 'main')
    4. Press Finish button
    5. Open main.cpp file in built-in editor
    6. Find 'return 0;' line
    7. Replace 'return 0;' on 'return EXIT_SUCCESS;'
    8. Save file
    9. 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
  2. Check 'Navigate
    1. New Project > C/C++ > C/C++ Application
    2. Specify a project name and location
    3. Let the Create Main File check box checked (File name is 'main')
    4. Press Finish button
    5. Open main.cpp file in built-in editor
    6. Find 'return 0;' line
    7. Replace 'return 0;' on 'return EXIT_SUCCESS;'
    8. Save file
    9. Call context on 'EXIT_SUCCESS' string. Select 'Navigate | View Macro Expansion' menu item
    • EXPECTED RESULT: 'Macro Expansion' tab should be opened. 'return 0;' line should be displayed in it.
  3. Check Ctrl-Alt-Click shortcut
    1. New Project > C/C++ > C/C++ Application
    2. Specify a project name and location
    3. Let the Create Main File check box checked (File name is 'main')
    4. Press Finish button
    5. Open main.cpp file in built-in editor
    6. Find 'return 0;' line
    7. Replace 'return 0;' on 'return EXIT_SUCCESS;'
    8. Save file
    9. 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;
      }
  4. Check 'Expand whole file' button
    1. New Project > C/C++ > C/C++ Application
    2. Specify a project name and location
    3. Let the Create Main File check box checked (File name is 'main')
    4. Press Finish button
    5. Open main.cpp file in built-in editor
    6. Find 'return 0;' line
    7. Replace 'return 0;' on 'return EXIT_SUCCESS;'
    8. Save file
    9. Press Ctrl-Alt-Mouse's click
    10. 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
  5. Check 'Synchronize caret' toggle button
    1. New Project > C/C++ > C/C++ Application
    2. Specify a project name and location
    3. Let the Create Main File check box checked (File name is 'main')
    4. Press Finish button
    5. Open main.cpp file in built-in editor
    6. Find 'return 0;' line
    7. Replace 'return 0;' on 'return EXIT_SUCCESS;'
    8. Save file
    9. Press Ctrl-Alt-Mouse's click
    10. 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
    11. Switch off 'Synchronize caret, content and context' toggle button in 'Macro Expansion' tab
    12. Click on 'return 0;' line in 'Macro Expansion' tab
    • EXPECTED RESULT: 'int main(int argc, char** argv) {' is selected in built-in editor
  6. Check 'Next macro' and 'Previous macro' buttons
    1. New Project > C/C++ > C/C++ Application
    2. Specify a project name and location
    3. Let the Create Main File check box checked (File name is 'main')
    4. Press Finish button
    5. Open main.cpp file in built-in editor
    6. Replaced 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;
      }
    7. Find 'return EXIT_SUCCESS;' line
    8. Press Ctrl-Alt-Mouse's click
    9. Move cursor in 'Macro Expansion' tab on 'int main(int argc, char** argv) {' line
    10. 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
  7. Check tooltip in 'Macro Expansion' tab
    1. New Project > C/C++ > C/C++ Application
    2. Specify a project name and location
    3. Let the Create Main File check box checked (File name is 'main')
    4. Press Finish button
    5. Open main.cpp file in built-in editor
    6. Replaced 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;
      }
    7. Find 'return EXIT_SUCCESS;' line
    8. Press Ctrl-Alt-Mouse's click
    9. Press Ctrl button and move cursor on 'v' variable in 'Macro Expansion' tab (in 'v + v + ...' line )
    • EXPECTED RESULT: Tooltip is appeared. Tooltip contains such text:
Variable v
int v
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo