Comments (1)
This is not that easy. The Spec must respect the precedent snapshot, thus, it will
not be complicated to well-typed the code with a newΒ f
and an old spec
.
For instance with the addition:
let pos_add x y =
let z = x + y in
if z > 0 then z else -1
let pos_add_new x y =
let z = x + y in
if z > 0 then Some z else None
The user can write:
let f x y =
match pos_add_new x y with
| Some z -> z
| None -> -1
let test = Test.(make ~count:5 ~rand ~path ~name:"add" ~spec f) in
Having the extract parameter would not provide a really useful feature.
from osnap.
Related Issues (20)
- Make diff only on results HOT 1
- Allows optional path HOT 3
- New diff should be printed in green HOT 1
- Refactor tests with common helpers
- module Interpret is useless HOT 2
- Keep generated values improving the code's coverage
- No support for labelled parameters
- Better CI
- Support exceptions raised by functions tested HOT 1
- Provide Result default types
- Path not found HOT 2
- Encoding integers too big
- What happens when switching from Marshal/Data_encoding snapshots HOT 2
- Use snapshot with missing encodings HOT 1
- Interactive mode and `test` stanza
- Remove patdiff dependency HOT 2
- Translate to alcotest tests
- Interactive mode should display diff instead of new version
- Better snapshot error management HOT 1
- Allows no printer for parameters HOT 1
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 osnap.