metaborg / spt

Apache License 2.0
0 stars 8 forks source link

Wildcards in test expectations #8

Closed VolkerL closed 8 years ago

VolkerL commented 8 years ago

This PR adds:

  1. support for wildcards inside the ATerm part of expectations
    parse to Some(Node(_))
  2. transform "my transformation" is now a valid test expectation.
  3. org.metaborg.spt.test contains tests to check the behaviour of SPT.
    The LanguageDiscoveryService failed to load SPT-Interactive so for now we just need to check these tests manually. I would have loved to test SPT in SPT though...
  4. minor updates to error messages.
VolkerL commented 8 years ago

Also included a fix that allows wider selections like:

test array instantiation yields an integer array [[
  class Main {
    public static void main(String[] args) {
      System.out.println([[ new int[3] ]].length);
    }
  }
 ]]

The wider selection (i.e., spaces at the edges) is required, because the ] of the array gets in the way of the closing marker ]].

Gohla commented 8 years ago

That solves one of the cases that every compiler construction student runs into. Very nice 👍