eclipse-qvto / org.eclipse.qvto

Eclipse Public License 2.0
0 stars 0 forks source link

Completion tests are not supported for ... org.eclipse.ocl.examples.build #1084

Open eclipse-qvt-oml-bot opened 1 day ago

eclipse-qvt-oml-bot commented 1 day ago

| --- | --- | | Bugzilla Link | 571374 | | Status | NEW | | Importance | P3 normal | | Reported | Feb 19, 2021 15:02 EDT | | Modified | Mar 22, 2021 04:58 EDT | | See also | 572164 | | Reporter | Ed Willink |

Description

After fixing the obsolete JRE running the org.eclipse.m2m.internal.tests.qvt.oml.ui.AllTests launch in my workspace fails. Seemsthat the blackbox in org.eclipse.ocl.examples.build causes something to barf.

junit.framework.AssertionFailedError: Completion tests are not supported for org.eclipse.m2m.qvt.oml.javaBlackboxUnits in org.eclipse.ocl.examples.build - close project\ at junit.framework.Assert.fail(Assert.java:57)\ at junit.framework.TestCase.fail(TestCase.java:223)\ at org.eclipse.m2m.internal.tests.qvt.oml.ui.completion.CompletionTest.(CompletionTest.java:86)\ at org.eclipse.m2m.internal.tests.qvt.oml.ui.completion.CompletionTests.loadTestCases(CompletionTests.java:57)\ at org.eclipse.m2m.internal.tests.qvt.oml.ui.completion.CompletionTests.suite(CompletionTests.java:38)

eclipse-qvt-oml-bot commented 1 day ago

By Ed Willink on Feb 19, 2021 15:07

Commenting out the extension point in org.eclipse.ocl.examples.build and the tests pass.

There seems to be a more fundamental problem with completion tests requiring multiple tests to be revised when a black box is added. The tests might be more manageable if the expectations were synthesized from categories, so that new black box is just added to a category once. Eacg category potentially comprises a list of XXX.class to ensure that typis are compile-time detected/refactprable.

eclipse-qvt-oml-bot commented 1 day ago

By Christopher Gerking on Feb 19, 2021 16:07

That's the usual (yet ugly) behavior. For the completion tests to succeed, you must not have QVTo projects with additional blackboxes in your workspace.

eclipse-qvt-oml-bot commented 1 day ago

By Ed Willink on Feb 20, 2021 00:53

I presume the problem is solely for QVTo developers...

But the message seems to imply that the problem case has been narrowly diagnosed, so won't a System.err.println rather than assertion fail do, or is it just a guard for a follow on Completion miss?

If there waa a list of known blackboxes, which there is in each of

tests/org.eclipse.m2m.tests.qvt.oml.ui/completionTestData/bugzilla1978/expected.txt\ tests/org.eclipse.m2m.tests.qvt.oml.ui/completionTestData/bugzilla1999/expected.txt\ tests/org.eclipse.m2m.tests.qvt.oml.ui/completionTestData/mixedImportItems/expected.txt

unknown blackboxes could be filtered for testing and known blackboxes enumerated exactly once, perhaps automatically by plugin-id.