-
Notifications
You must be signed in to change notification settings - Fork 2
integrate C# tests #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
integrate C# tests #158
Conversation
@ftomassetti I tried to copy over the tests I wrote for C#. Quite a few are commented out because of API differences, and some are failing. |
import java.util.List; | ||
|
||
public class CollectionAssert { | ||
public static void AreEqual(@Nonnull List<?> expected, @Nonnull List<?> actual) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not areEqual
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's a bit less Seach+Replace atm. Want to rename it once I copied all the code.
* Entrypoint for working with the Shapes example language. | ||
*/ | ||
public class ShapesDynamic { | ||
public static final io.lionweb.lioncore.java.language.Language Language; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not language
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above, simplify Search+Replace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these binary .class
files here? Are these generated directly to bytecode by Kolasu? Is documented how these files are generated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, they are from Kolasu. Currently only playing around (see my open question to Federico). Once I understand how they're supposed to integrate with LW we can think of a proper way to do this.
In any case, I don't want to include any Kotlin code in this project -- would make it harder for others to consume and understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good points. I wouldn't mind seeing a line or 2 about this in some documentation—if even it's just saying “generated by Kolasu, instructions might come” or something.
I cannot find the files in the PR, but I think I understand what you mean. Initially, I experimented with making all Kolasu nodes be also lionweb nodes (the Kolasu's Node class would implement the LionWeb's Node interface). This was the solution used in the Kolasu 2.0 branch, now abandoned. I then went for another approach in the current Kolasu 1.5 and in the Kolasu 1.6 branch under development: keeping Kolasu's Nodes separate from LionWeb Nodes but add a class that can convert between Kolasu's languages and nodes to and from LionWeb's languages and nodes. The rationale is that this gives us more flexibility, especially at a time when LionWeb's specs are still changing. So I think you generate Kolasu's nodes using Kolasu 1.5.* and notices they do not extend LionWeb's Nodes. You can:
Regarding the second approach, we could generate classes that look like this:
Where Is this what you had in mind? |
I think that's what I did:
If we have to write a new generator anyways, I'd prefer to keep it Java-only. |
No description provided.