Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 879525 Details for
Bug 1078839
Guided rule with DSL is not able to build (ERR102) on ibm16
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Unit test illustrating the DSL parsing problem
GreedyDslTest.java (text/x-java), 1.50 KB, created by
Marek Winkler
on 2014-03-27 15:22:48 UTC
(
hide
)
Description:
Unit test illustrating the DSL parsing problem
Filename:
MIME Type:
Creator:
Marek Winkler
Created:
2014-03-27 15:22:48 UTC
Size:
1.50 KB
patch
obsolete
>package org.jboss.qa.brms.bre.regression; > >import java.io.StringReader; > >import org.junit.Test; >import org.kie.api.KieServices; >import org.kie.api.io.KieResources; >import org.kie.api.io.Resource; >import org.kie.api.io.ResourceType; >import org.kie.internal.utils.KieHelper; > >/** > * Tests DSL parsing which should try to eat the maximum input fragment. > */ >public class GreedyDslTest { > > // switch the DSL lines and the test succeeds > private static final String DSL = "[when]There is a number with=i:Integer()\n" > + "[when]There is a number with value of {value}=i:Integer(intValue() == {value})\n"; > > private static final String DSLR = "package org.test \n" > + "rule 'sample rule' \n" > + "when \n" + " There is a number with value of 10\n" > + "then \n" + "end \n"; > > /** > * Tests compiling DSL with overlapping definitions. > */ > @Test > public void testGreedyDsl() { > final KieResources resources = KieServices.Factory.get().getResources(); > final Resource dslResource = resources.newReaderResource(new StringReader(DSL)); > dslResource.setResourceType(ResourceType.DSL); > dslResource.setSourcePath("src/main/resources/test.dsl"); > > final Resource dslrResource = resources.newReaderResource(new StringReader(DSLR)); > dslrResource.setResourceType(ResourceType.DSLR); > dslrResource.setSourcePath("src/main/resources/test.dslr"); > > new KieHelper().addResource(dslResource).addResource(dslrResource).build(); > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1078839
: 879525 |
894669