Development | Design Work | Code Management | Collaboration |
---|---|---|---|
Programming Languages | Testing | Technology Stack |
---|---|---|
A generator for descriptor based ANTLRng runtime test cases
License: MIT License
After spawning a process, you access output.stderr
, but without checking if it exists.
Line 219 in 95e0cd2
Without an additional check, e.g., if (output.stderr && ...)
, I get
TypeError: Cannot read properties of null (reading 'length')
at C.generateANTLRFilesInWorkDir
Generated grammars - under different directories - will have the same name.
This is problematic for the Gradle's ANTLR plugin, which will output generated classes on a single directory, with a single package.
This means class names will conflict.
My proposal is to generate unique names by using a global counter as suffix:
M1.g4
S2.g4
M3.g4
spawnSync
returns an object containing a status
property.
The exit code of the subprocess, or null if the subprocess terminated due to a signal.
However you're only checking for 0
.
I'm not sure what subprocess terminated due to a signal means, but that's the case I see on my laptop.
Probably it's because I'm using Node through Gradle? Who knows.
Line 249 in 95e0cd2
With a config file such as:
{
"language": "Java",
"targetPath": "./build/generatedAntlrTests",
"targetExtension": "java",
"testFileName": "Test",
"grammarTemplateFile": "./templates/Kotlin.grammar.stg",
"specTemplateFile": "./templates/Kotlin.test.stg",
"groupIncludes": [],
"groupExcludes": [],
"testIncludes": [],
"testExcludes": [],
"files": []
}
I get
Found config validation errors in ./antlr-tgen.json
MINITEMS must NOT have fewer than 1 items
10 | "testIncludes": [],
11 | "testExcludes": [],
> 12 | "files": []
| ^ ?? minItems must NOT have fewer than 1 items
13 | }
14 |
If I remove it entirely, I get
Found config validation errors in ./antlr-tgen.json
REQUIRED must have required property 'files'
> 1 | {
| ^ ?? files is missing here!
2 | "language": "Java",
3 | "targetPath": "./build/generatedAntlrTests",
4 | "targetExtension": "java",
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.