Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Content Assist Question(an other one !)
Content Assist Question [message #715373] Sat, 13 August 2011 16:28 Go to next message
Michel Simeon is currently offline Michel SimeonFriend
Messages: 130
Registered: December 2009
Senior Member
I am trying to develop a comprehensive set of JUnit tests for my DSL.

At a given point, Ctrl-Space gives me the following choices:

-Script FileSpec - template for a Script FileSpec
end
fileSpec

I have no problem to test options 2 and 3, but option 1 is the name of a user-defined
template (suppose it is: fileSpec = fileSpecID ; ) where fileSpecID id a cross-reference to some pre-defined ID.

Of course I can do:
.assertMatchString("-Script FileSpec - template for a Script FileSpec, end, fileSpec")
.append("fileSpec = FileID1 ;")
.append(" ")

and repeat it for all possible values of fileSpecID. But would it guarantee that the list in the template was correct and that FileID1 is valid ?

Is there a better way ?
for hints
MS
Thanks

Re: Content Assist Question [message #715375 is a reply to message #715373] Sat, 13 August 2011 16:36 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13888
Registered: July 2009
Senior Member
Hi,

what about testing scoping and ca separately? you shoulkd not test "everything" in you ca test. and of course you should not test the xtext framework itself.
btw do you know http://startbigthinksmall.wordpress.com/2011/08/01/eclipse-labs-xtext-utils-unit-testing-helpers-released/?

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Sat, 13 August 2011 16:37]

Report message to a moderator

Re: Content Assist Question [message #715411 is a reply to message #715375] Sat, 13 August 2011 20:12 Go to previous message
Michel Simeon is currently offline Michel SimeonFriend
Messages: 130
Registered: December 2009
Senior Member
Hi Christian.

I did not know about the testing-helpers utilities and will look into it, it might be the answer to many of my questions.
Thanks again
MS
Previous Topic:Is it possbile to modify "ImportURI Mechanism"?
Next Topic:Xtext 2.0.1 Fixes
Goto Forum:
  


Current Time: Fri Apr 23 03:20:46 GMT 2021

Powered by FUDForum. Page generated in 0.01649 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top