clean-test-properties issueshttps://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues2020-10-13T10:25:26+02:00https://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/1add function preconditions2020-10-13T10:25:26+02:00Steffen Michelsadd function preconditionsFor `Math.Geometry.normalize` I had to use a precondition to make tests succeed:
```
/**
* Normalizes an angle.
*
* @param the angle to normalize
* @result the normalized angle
* @property normalized degree range: A.angle :: Angle:...For `Math.Geometry.normalize` I had to use a precondition to make tests succeed:
```
/**
* Normalizes an angle.
*
* @param the angle to normalize
* @result the normalized angle
* @property normalized degree range: A.angle :: Angle:
* (abs deg <= toReal (maxint/365)) ==> (0.0 <=. degNorm /\ degNorm <=. 360.0)
* with
* deg = toDeg angle
* degNorm = toDeg (normalize angle)
* @property normalized radian range: A.angle :: Angle:
* (abs deg <= toReal (maxint/365)) ==> (0.0 <=. radNorm /\ radNorm <=. 2.0 * pi)
* with
* deg = toDeg angle
* radNorm = toRad (normalize angle)
* @property idempotence: A.angle :: Angle:
* (abs deg <= toReal (maxint/365)) ==> normalize angle ~~ normalize (normalize angle)
* with
* deg = toDeg angle
*/
normalize :: !Angle -> Angle
```
I'd be great to be able to state the precondition (`(abs deg <= toReal (maxint/365)) with deg = toDeg angle`) only once. Additionally, then this precondition is clearly documented. The precondition would have to be added to all properties of the function and there are probably some pitfalls when doing this.
For the old-style documentation maybe we can use `@param-precondition` after the `@param` it refers to. For the declarative style documentation I'm not sure yet.Camil StapsCamil Stapshttps://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/2Allow testing of generic functions using @property2020-05-25T14:10:46+02:00Camil StapsAllow testing of generic functions using @propertyhttps://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/3Allow testing of class instances with @property2019-09-04T12:50:34+02:00Camil StapsAllow testing of class instances with @propertyhttps://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/4Allow spaces in @property names2018-06-25T19:46:13+02:00Camil StapsAllow spaces in @property nameshttps://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/5Enhance bootstrap of generated test modules2018-08-29T22:44:17+02:00Camil StapsEnhance bootstrap of generated test modulesThings that should be imported automatically:
- [x] The `toString` instance of `{#Char}` (for `name`)
- [x] The tested module itself
- [ ] `derive` of test generation, JSON encoding etc. for tested typesThings that should be imported automatically:
- [x] The `toString` instance of `{#Char}` (for `name`)
- [x] The tested module itself
- [ ] `derive` of test generation, JSON encoding etc. for tested typeshttps://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/6Too many dependencies2018-07-11T22:38:53+02:00Bas LijnseToo many dependenciesI tried to add the test tools to the nightly builds, but I can't get them too work (on all platforms) because of all the extra dependencies. If we want to use this test runner as the standard tool for testing the clean packages it should...I tried to add the test tools to the nightly builds, but I can't get them too work (on all platforms) because of all the extra dependencies. If we want to use this test runner as the standard tool for testing the clean packages it should have minimal dependencies.https://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/7Add option to show representation of generated arguments when using @property...2019-01-30T00:06:10+01:00Camil StapsAdd option to show representation of generated arguments when using @property-test-generatorWhen `@property-test-generator` is used, counter-examples contain a string representation of the argument of the generator. In some cases (e.g., using an integer to pick a value from a list), it is preferable to show a representation of ...When `@property-test-generator` is used, counter-examples contain a string representation of the argument of the generator. In some cases (e.g., using an integer to pick a value from a list), it is preferable to show a representation of the generated argument instead. This should be an option on the test generator.Camil StapsCamil Stapshttps://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/8Add test generator that picks values from a list2019-01-29T23:23:04+01:00Camil StapsAdd test generator that picks values from a listSometimes it's useful to have a test generator that picks values from a list. You can currently fake this by using a test generator that takes an integer argument for the list index, but then the computed coverage is not right.Sometimes it's useful to have a test generator that picks values from a list. You can currently fake this by using a test generator that takes an integer argument for the list index, but then the computed coverage is not right.Camil StapsCamil Stapshttps://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/9Module-specific options2020-09-26T15:43:46+02:00Camil StapsModule-specific optionshttps://gitlab.science.ru.nl/clean-and-itasks/clean-platform/merge_requests/266 adds some tests for Text.Encoding.Base64. Because Platform tests with `Tests 100000` and these are quite heavy, testing takes a long time, while this many te...https://gitlab.science.ru.nl/clean-and-itasks/clean-platform/merge_requests/266 adds some tests for Text.Encoding.Base64. Because Platform tests with `Tests 100000` and these are quite heavy, testing takes a long time, while this many tests is not actually needed for that module. But to set options for different modules from the command-line would get very complicated very quickly. Perhaps we can add a `.testproperties.json` configuration file where both the defaults and per-module overrides are stored.https://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/10name of type should be included in instance property names2019-12-24T19:27:37+01:00Steffen Michelsname of type should be included in instance property namesThis would be more informative and also avoids name conflicts. A name conflict arises now with e.g.:
```
/**
* @property name: ...
*/
instance C T1 ...
/**
* @property name: ...
*/
instance C T2 ...
```
But properties will be name...This would be more informative and also avoids name conflicts. A name conflict arises now with e.g.:
```
/**
* @property name: ...
*/
instance C T1 ...
/**
* @property name: ...
*/
instance C T2 ...
```
But properties will be named `C: name` in this case. I'd prefer something as `instance C T1: name`.Camil StapsCamil Stapshttps://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/11properties are not processed if a newtype definition with a comment on the sa...2020-01-06T09:38:46+01:00Steffen Michelsproperties are not processed if a newtype definition with a comment on the same line is presentFor instance adding this to a DCL leads to all properties being ignored:
```
:: A =: A Int //* ...
```For instance adding this to a DCL leads to all properties being ignored:
```
:: A =: A Int //* ...
```Camil StapsCamil Stapshttps://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/12make bootstrap definitions available in test generators2020-04-14T17:43:06+02:00Steffen Michelsmake bootstrap definitions available in test generatorsIn `@property-test-generator` definitions currently only definitions/imports exported in the dcl can be used. Making it possible to use imports/definitions from `@property-bootstrap` avoids exporting things only used for testing.In `@property-test-generator` definitions currently only definitions/imports exported in the dcl can be used. Making it possible to use imports/definitions from `@property-bootstrap` avoids exporting things only used for testing.Camil StapsCamil Stapshttps://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/13Collect properties from icl file2021-02-19T16:04:50+01:00Camil StapsCollect properties from icl fileThis is useful to test functions which you don't want to export, and to test main modules (for which no definition module exists).This is useful to test functions which you don't want to export, and to test main modules (for which no definition module exists).https://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/14Generate shorter function names2020-09-29T09:20:32+02:00Camil StapsGenerate shorter function namesThe way we generate labels can lead to long labels for long test names. This can cause warnings from the code generator, like `Label too long, extra characters ignored at line 4978`. We should try to generate shorter names.The way we generate labels can lead to long labels for long test names. This can cause warnings from the code generator, like `Label too long, extra characters ignored at line 4978`. We should try to generate shorter names.Camil StapsCamil Stapshttps://gitlab.science.ru.nl/clean-and-itasks/clean-test-properties/-/issues/15Add CI for different platforms2020-10-09T12:39:57+02:00Camil StapsAdd CI for different platformsSee clean-test#20.See clean-test#20.Camil StapsCamil Staps