https://github.com/eclipse/xpect
This repository has been rewritten to move to the Eclipse Foundation. Find the old history here: https://github.com/TypeFox/Xpect
https://github.com/eclipse/xpect
Last synced: 8 months ago
JSON representation
This repository has been rewritten to move to the Eclipse Foundation. Find the old history here: https://github.com/TypeFox/Xpect
- Host: GitHub
- URL: https://github.com/eclipse/xpect
- Owner: eclipse
- License: epl-2.0
- Created: 2012-06-26T14:02:51.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2025-03-28T05:35:55.000Z (9 months ago)
- Last Synced: 2025-03-28T06:26:59.727Z (9 months ago)
- Language: Java
- Homepage: http://www.xpect-tests.org/
- Size: 35.4 MB
- Stars: 34
- Watchers: 16
- Forks: 28
- Open Issues: 124
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Eclipse Xpect
Eclipse Xpect™ is a unit- and integration-testing framework to be used for Xtext-based languages. Test data (e.g. expectations) are embedded into programs written in the DSL under tests. Xpect itself is based on Junit; new test methods can be written in Java and are called by the Xpect framework with the test data. Typical Xpect tests include expecting certain error messages, ensuring correct scopes, or specific content assist proposals.
## Documentation
Visit [xpect-tests.org](http://www.xpect-tests.org) for details.
#### Nightly builds
Use Jenkins https://ci.eclipse.org/xpect/job/Xpect/job/master/lastSuccessfulBuild/artifact/org.eclipse.xpect.releng/p2-repository/target/repository/
# Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
## Compile and Build Xpect by Yourself
Prerequisite: Java 17 or newer; Eclipse (2023-03 or newer recommended); Xtext 2.31.0.
1. Clone https://github.com/eclipse/Xpect (this repository)
2. Import all projects into your Eclipse workspace.
3. Set target platform to xpect_latest.target (Preferences -> Plug-in Development -> Target Platform)
4. Run /org.eclipse.xpect/src/org/eclipse/xpect/GenerateXpect.mwe2, /org.xtext.example.arithmetics/src/org/eclipse/xpect/example/arithmetics/GenerateXpect.mwe2, /org.xtext.example.domainmodel/src/org/xtext/example/domainmodel/GenerateDomainmodel.mwe2. Now your projects should be without errors markers. Sometimes, even after these steps, several projects still have error markers. However, this is a refresh problem in Eclipse. Simply clean build the projects with error markers will solve the issues.
5. Run `mvn -P '!tests' -Dtarget-platform=xpect_latest --batch-mode --update-snapshots -fae -Dmaven.repo.local=xpect-local-maven-repository -DtestOnly=false clean install` to build artefacts and create a p2 repository (formerly known as update site).