This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 235329 - Test UseNbBundleMessagesTest.addToExistingMultiple fails.
Summary: Test UseNbBundleMessagesTest.addToExistingMultiple fails.
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.4
Hardware: All All
: P1 normal (vote)
Assignee: Martin Kozeny
URL: http://deadlock.netbeans.org/job/NB-C...
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2013-08-30 16:56 UTC by Martin Entlicher
Modified: 2013-08-31 08:19 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2013-08-30 16:56:05 UTC
Error Message

The output code does not match the expected code. expected:<...urn flag 1? one() : [flag2 ? two() : three(); ]} } > but was:<...urn flag 1? one() : []} } >

Stacktrace

junit.framework.ComparisonFailure: The output code does not match the expected code. expected:<...urn flag 1? one() : [flag2 ? two() : three(); ]} } > but was:<...urn flag 1? one() : []} } >
	at org.netbeans.modules.java.hints.test.api.HintTest$AppliedFix.assertOutput(HintTest.java:1088)
	at org.netbeans.modules.java.hints.test.api.HintTest$AppliedFix.assertOutput(HintTest.java:1061)
	at org.netbeans.modules.apisupport.hints.UseNbBundleMessagesTest.addToExistingMultiple(UseNbBundleMessagesTest.java:399)
Comment 1 Ondrej Vrabec 2013-08-30 18:25:48 UTC
honzo, can this be caused by one of your changes in java.hints? http://deadlock.netbeans.org/job/NB-Core-Build/327/changes
Comment 2 Jan Lahoda 2013-08-30 19:27:02 UTC
Appears to be caused by:
http://hg.netbeans.org/jet-main/rev/234bbe22a0de

I'll look into it, but might take time - if you need hotfix, then maybe using "flag1" instead of "flag 1" in the test example would be acceptable?

diff -r 72e73121ff2a apisupport.refactoring/test/unit/src/org/netbeans/modules/apisupport/hints/UseNbBundleMessagesTest.java
--- a/apisupport.refactoring/test/unit/src/org/netbeans/modules/apisupport/hints/UseNbBundleMessagesTest.java   Fri Aug 30 10:49:57 2013 +0200
+++ b/apisupport.refactoring/test/unit/src/org/netbeans/modules/apisupport/hints/UseNbBundleMessagesTest.java   Fri Aug 30 21:23:40 2013 +0200
@@ -403,7 +403,7 @@
                        "class Test {\n" +
                        "    @Messages({\"one=first\", \"two=second\"})\n" +
                        "    String m(boolean flag1, boolean flag2) {\n" +
-                       "        return flag 1? one() : flag2 ? two() : org.openide.util.NbBundle.getMessage(Test.class, \"three\");\n" +
+                       "        return flag1 ? one() : flag2 ? two() : org.openide.util.NbBundle.getMessage(Test.class, \"three\");\n" +
                        "    }\n" +
                        "}\n", false).
                 input("test/Bundle.properties", "three=third\n", false).
@@ -417,7 +417,7 @@
                        "class Test {\n" +
                        "    @Messages({\"one=first\", \"two=second\", \"three=third\"})\n" +
                        "    String m(boolean flag1, boolean flag2) {\n" +
-                       "        return flag 1? one() : flag2 ? two() : three();\n" +
+                       "        return flag1 ? one() : flag2 ? two() : three();\n" +
                        "    }\n" +
                        "}\n");
     }
Comment 3 Martin Kozeny 2013-08-30 19:36:51 UTC
Hotfix is ok, thanks.
Comment 4 Martin Kozeny 2013-08-30 20:15:53 UTC
https://hg.netbeans.org/core-main/rev/49d292eee96a