Comments (3)
The given file contract.JSON
is not a valid JSON file and does not conform to the example at https://randoop.github.io/randoop/manual/net_connection_spec.json . So, this looks like a duplicate of #934.
from randoop.
Thank you so much for your time.
from randoop.
Hi,
I hope you are doing well.
I am talking to a Master's student about potential work on translating JML to JSON for Randoop. However, we have a problem writing a contract in JSON to introduce an array with a primitive type (like the earlier CoppyArray attached file that has two array arguments with int type). The following JSON file is valid using this link https://jsonlint.com/.
However, Randoop cannot parse this JSON file. Also, I could not find any example that shows how array types should be defined in Randoop. (Bold part in the following JSON)
[{
"operation": {
"classname": "org.CopyArray",
"name": "CopyArray",
"parameterTypes": [
"int[]", "int", "int", "int[]"
]
},
"identifiers": {
"parameters": [
"b", "iBegin", "iEnd", "a"
]
},
"post": [],
"pre": [{
"guard": {
"description": "the code must be positive",
"condition": "iBegin >= 0"
}
},
{
"guard": {
"description": "the code must be positive",
"condition": "iEnd >= 0"
}
},
{
"guard": {
"description": "iEnd can be larger or equal to iBegin",
"condition": "iEnd >= iBegin"
}
}
]
}]
Output:
java -ea -classpath /home/amirfarhad/Desktop/ProgramAnalysis/codes/Randoop/CopyArray/bin:/home/amirfarhad/Desktop/ProgramAnalysis/Tools/randoop-4.2.6/randoop-all-4.2.6.jar randoop.main.Main gentests --testclass=org.CopyArray --specifications=contract.JSON
Randoop for Java version "4.2.6, local changes, branch master, commit 5beca45, 2021-05-03".
Error in specifications: Could not load specification operation: {
"classname": "org.CopyArray",
"name": "CopyArray",
"parameterTypes": "[int[], int, int, int[]]"
} while reading file contract.JSON: int[]
from randoop.
Related Issues (20)
- Generate specific method sequence HOT 1
- Randoop release (zip archive) broken
- No (or very little) test generated for some Apache projects
- java.lang.NoClassDefFoundError: javax/json/JsonStructure HOT 5
- Facing problem to generate unit-tests using jar file of a project in randoop.
- I am facing issue while generating unit tests for a package of a project
- Running Randoop in the IntelliJ debugger fails with java.lang.IllegalArgumentException: Path component should be '/' HOT 2
- I am facing an issue while writing test cases to a file HOT 1
- Randoop cannot write test cases HOT 3
- Randoop creates false-positives in errors on basic types/Object casts
- Randoop fails with a runtime exception when generating tests for spring HOT 1
- Use `Assert.assertArrayEquals` to compare for array equality instead of comparing String representation HOT 1
- Test case generation for Map HOT 1
- Not checking precondition correctly HOT 3
- Uncompilable sequences generated HOT 3
- mac terminal run fail HOT 2
- No test HOT 2
- Cannot provide post-condition specification to void methods
- Support for a version of java greater than 11 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from randoop.