Skip to content
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

Improve ergonomics of language-specific literals #423

Open
niknetniko opened this issue Aug 22, 2023 · 1 comment
Open

Improve ergonomics of language-specific literals #423

niknetniko opened this issue Aug 22, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@niknetniko
Copy link
Member

niknetniko commented Aug 22, 2023

Currently, language-specific literals must be written as follows:

- tab: "My tab"
  testcases:
  - expression:
      c: "to_string(1+1)"
      haskell: "Submission.toString (1+1)"
      runhaskell: "Submission.toString (1+1)"
      java: "Submission.toString(1+1)"
      javascript: "submission.toString(1+1)"
      kotlin: "toString(1+1)"
      python: "submission.to_string(1+1)"
      csharp: "Submission.toString(1+1)"
    return: "2"

This issue is to collect ideas about how to improve this situation.

  • Always using a namespace is for example not possible in C, since C doesn't have namespaces. Using the same namespace everywhere is also difficult, since a TESTed "namespace" doesn't always mean the same thing: in Java this is a class name, while in Python it is a package name.
  • We cannot and will not inspect these strings: these are opaque values to TESTed; we just insert them in the correct position in the generated code.

Related #420, #399.

@niknetniko niknetniko added the enhancement New feature or request label Aug 22, 2023
@pdawyndt
Copy link
Contributor

Important issue about namespaces, is that they will also appear when expressions/statements are included in feedback. Users will thus see a difference with language-agnostic specifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants