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: -

  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. Select "C" language
    5. Press Finish button
    6. Open main.c file in built-in editor
    7. Find 'return (EXIT_SUCCESS);' line
    8. 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. Select "C" language
    5. Press Finish button
    6. Open main.c file in built-in editor
    7. Find 'return (EXIT_SUCCESS);' line
    8. 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.
  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. Select "C" language
    5. Press Finish button
    6. Open main.c file in built-in editor
    7. Find 'return (EXIT_SUCCESS);' line
    8. 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. Select "C" language
    5. Press Finish button
    6. Open main.c file in built-in editor
    7. Find 'return (EXIT_SUCCESS);' line
    8. Press Ctrl-Alt-Mouse's click
    9. 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, content and context' 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. Select "C" language
    5. Press Finish button
    6. Open main.c file in built-in editor
    7. Find 'return (EXIT_SUCCESS);' line
    8. Press Ctrl-Alt-Mouse's click
    9. 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
    10. Switch off 'Synchronize caret, content and context' toggle button in 'Macro Expansion' tab
    11. 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. Select "C" language
    5. Press Finish button
    6. Open main.c file in built-in editor
    7. 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);
      }
    8. Find 'return (EXIT_SUCCESS);' line
    9. Press Ctrl-Alt-Mouse's click
    10. Move cursor in 'Macro Expansion' tab on 'int main(int argc, char** argv) {' line
    11. 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. Select "C" language
    5. Press Finish button
    6. Open main.c file in built-in editor
    7. 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);
      }
    8. Find 'return (EXIT_SUCCESS);' line
    9. Press Ctrl-Alt-Mouse's click
    10. 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
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