Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Uninit var: Added TODO test case

  • Loading branch information...
commit 548a43fc49496af9a07a0053a8117c472c641b0a 1 parent fbb5ebe
Daniel Marjamäki authored

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. +7 0 test/testuninitvar.cpp
7 test/testuninitvar.cpp
@@ -1760,6 +1760,13 @@ class TestUninitVar : public TestFixture {
1760 1760 "}");
1761 1761 ASSERT_EQUALS("[test.cpp:3]: (error) Uninitialized variable: abc\n", errout.str());
1762 1762
  1763 + checkUninitVar2("void f() {\n"
  1764 + " int x;\n"
  1765 + " int y = x;\n"
  1766 + "}\n");
  1767 + TODO_ASSERT_EQUALS("error", "", errout.str());
  1768 +
  1769 +
1763 1770 checkUninitVar2("int f() {\n"
1764 1771 " static int x;\n"
1765 1772 " return ++x;\n"

0 comments on commit 548a43f

Please sign in to comment.
Something went wrong with that request. Please try again.