Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit 9706e66

Browse files
authored
Merge pull request #127 from lumen/proptest
Property tests
2 parents f682ccb + a68e49a commit 9706e66

File tree

1,254 files changed

+23783
-72660
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,254 files changed

+23783
-72660
lines changed

.circleci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM circleci/rust
22

33
RUN rustup default nightly
44

5-
RUN rustup component add rustfmt clippy-preview
5+
RUN rustup component add rustfmt
66

77
# Add WASM target
88
RUN rustup target add wasm32-unknown-unknown --toolchain nightly

.circleci/config.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,31 @@ jobs:
44
docker:
55
# `kronicdeth` is temporary until we get a DockerHub organization
66
- image: kronicdeth/lumen-development
7+
resource_class: medium+
8+
environment:
9+
CARGO_HOME: cargo
710
steps:
811
- checkout
912
- run:
1013
name: Version Information
1114
command: rustc --version; cargo --version; rustup --version
1215
- restore_cache:
1316
keys:
14-
- v1-cargo-cache-x86_64-{{ checksum "Cargo.lock" }}
17+
- v4-cargo-cache-x86_64-{{ checksum "Cargo.lock" }}
1518
- run:
1619
name: Build all targets
17-
command: cargo build --all --all-targets
20+
command: cargo test --all --all-targets --locked --no-run
1821
- save_cache:
19-
key: v1-cargo-cache-x86_64-{{ checksum "Cargo.lock" }}
22+
key: v4-cargo-cache-x86_64-{{ checksum "Cargo.lock" }}
2023
paths:
21-
- /usr/local/cargo/registry
24+
- cargo
2225
- target/debug/.fingerprint
2326
- target/debug/build
2427
- target/debug/deps
2528
- persist_to_workspace:
2629
root: .
2730
paths:
31+
- cargo
2832
- examples
2933
- liblumen_alloc
3034
- liblumen_alloc_macros
@@ -49,27 +53,30 @@ jobs:
4953
docker:
5054
# `kronicdeth` is temporary until we get a DockerHub organization
5155
- image: kronicdeth/lumen-development
56+
environment:
57+
CARGO_HOME: cargo
5258
steps:
5359
- checkout
5460
- run:
5561
name: Version Information
5662
command: rustc --version; cargo --version; rustup --version
5763
- restore_cache:
5864
keys:
59-
- v1-cargo-cache-wasm32-{{ checksum "Cargo.lock" }}
65+
- v4-cargo-cache-wasm32-{{ checksum "Cargo.lock" }}
6066
- run:
6167
working_directory: "lumen_runtime"
6268
command: wasm-pack build
6369
- save_cache:
64-
key: v1-cargo-cache-wasm32-{{ checksum "Cargo.lock" }}
70+
key: v4-cargo-cache-wasm32-{{ checksum "Cargo.lock" }}
6571
paths:
66-
- /usr/local/cargo/registry
72+
- cargo
6773
- target/debug/.fingerprint
6874
- target/debug/build
6975
- target/debug/deps
7076
- persist_to_workspace:
7177
root: .
7278
paths:
79+
- cargo
7380
- examples
7481
- liblumen_alloc
7582
- liblumen_alloc_macros
@@ -94,6 +101,8 @@ jobs:
94101
docker:
95102
# `kronicdeth` is temporary until we get a DockerHub organization
96103
- image: kronicdeth/lumen-development
104+
environment:
105+
CARGO_HOME: cargo
97106
steps:
98107
- attach_workspace:
99108
at: .
@@ -106,26 +115,33 @@ jobs:
106115
docker:
107116
# `kronicdeth` is temporary until we get a DockerHub organization
108117
- image: kronicdeth/lumen-development
118+
resource_class: medium+
119+
environment:
120+
CARGO_HOME: cargo
109121
steps:
110122
- attach_workspace:
111123
at: .
112124
- run:
113125
name: Run all tests
114-
command: cargo test --all --all-targets --exclude spawn-chain
126+
command: cargo test --all --all-targets --exclude spawn-chain --frozen
115127
x86_64_single_threaded_test:
116128
docker:
117129
# `kronicdeth` is temporary until we get a DockerHub organization
118130
- image: kronicdeth/lumen-development
131+
environment:
132+
CARGO_HOME: cargo
119133
steps:
120134
- attach_workspace:
121135
at: .
122136
- run:
123137
name: Run all tests
124-
command: cargo test --all-targets --package spawn-chain -- --test-threads=1
138+
command: cargo test --all-targets --frozen --package spawn-chain -- --test-threads=1
125139
chrome_test:
126140
docker:
127141
# `kronicdeth` is temporary until we get a DockerHub organization
128142
- image: kronicdeth/lumen-development
143+
environment:
144+
CARGO_HOME: cargo
129145
steps:
130146
- attach_workspace:
131147
at: .
@@ -136,6 +152,8 @@ jobs:
136152
docker:
137153
# `kronicdeth` is temporary until we get a DockerHub organization
138154
- image: kronicdeth/lumen-development
155+
environment:
156+
CARGO_HOME: cargo
139157
steps:
140158
- attach_workspace:
141159
at: .
@@ -146,6 +164,8 @@ jobs:
146164
docker:
147165
# `kronicdeth` is temporary until we get a DockerHub organization
148166
- image: kronicdeth/lumen-development
167+
environment:
168+
CARGO_HOME: cargo
149169
steps:
150170
- attach_workspace:
151171
at: .

Cargo.lock

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

liblumen_alloc/src/erts/term.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ use core::fmt;
3333
use core::ptr;
3434

3535
use super::{HeapAlloc, ProcessControlBlock};
36+
use crate::borrow::CloneToProcess;
3637

3738
#[derive(Clone, Copy)]
3839
pub struct BadArgument(Term);

liblumen_syntax/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![deny(warnings)]
12
#![feature(box_patterns)]
23
#![feature(box_syntax)]
34
#![feature(core_intrinsics)]

lumen_runtime/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,19 @@ log = "0.4"
2222
num-bigint = "0.2.2"
2323
num-traits = "0.2.6"
2424

25+
[dev-dependencies]
26+
radix_fmt = "1.0.0"
27+
2528
[target.'cfg(unix)'.dependencies]
2629
internment = "0.3.6"
30+
proptest = "0.9.3"
2731
rand = "0.6"
2832
signal-hook = "0.1"
2933
xorshift = "0.1"
3034

3135
[target.'cfg(windows)'.dependencies]
3236
internment = "0.3.6"
37+
proptest = "0.9.3"
3338
rand = "0.6"
3439
signal-hook = "0.1"
3540
xorshift = "0.1"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Seeds for failure cases proptest has generated in the past. It is
2+
# automatically read and these particular cases re-run before any
3+
# novel cases are generated.
4+
#
5+
# It is recommended to check this file in to source control so that
6+
# everyone who runs the test benefits from these saved cases.
7+
cc b709ff26103442cde4e6b786e6780576ba1f02b330863de287c7653010850e6f # shrinks to (0.0_f64.into_process(&process), -0.0_f64.into_process(&process))
8+
cc 844b260e1526911cd29f38bb82478543b67fb774a52b51bd907b16d5543f8b9b # shrinks to (-0.0_f64.into_process(&process), -0.0_f64.into_process(&process))
9+
cc 6dd8d68628aa4352cc9bd2593f9dadfb475da016c0196afafa05fd2bedad5462 # shrinks to (0.0_f64.into_process(&process), 0.0_f64.into_process(&process))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Seeds for failure cases proptest has generated in the past. It is
2+
# automatically read and these particular cases re-run before any
3+
# novel cases are generated.
4+
#
5+
# It is recommended to check this file in to source control so that
6+
# everyone who runs the test benefits from these saved cases.
7+
cc 273f73441fba434addb8eed6f6c8fbec0744aa72da3d8e989d19a5d04c93e3fa # shrinks to (Term::subbinary(Term::slice_to_binary(&[0], &process), 0, 0, 0, 1, &process), 1.into_process(&process), -1.into_process(&process))
8+
cc 4dce9465ced32a423bfc19536b31d70784c676ffac71bab5024bfc01c939a1ea # shrinks to (Term::subbinary(Term::slice_to_binary(&[0], &process), 0, 0, 0, 1, &process), 0.into_process(&process), 1.into_process(&process))
9+
cc 70e7d9a71195f6233c9f8f423e8b037fec9345866d8f630c4d3d22a68750dbe3 # shrinks to (Term::subbinary(Term::slice_to_binary(&[0, 0, 0, 0], &process), 0, 0, 3, 1, &process), 1.into_process(&process), 3.into_process(&process))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Seeds for failure cases proptest has generated in the past. It is
2+
# automatically read and these particular cases re-run before any
3+
# novel cases are generated.
4+
#
5+
# It is recommended to check this file in to source control so that
6+
# everyone who runs the test benefits from these saved cases.
7+
cc 0db53f755647cde1ac992a130aa897517c8c99218ae6cb6510a732f12f362250 # shrinks to (Term::subbinary(Term::slice_to_binary(&[0, 0, 0, 0], &process), 0, 0, 3, 1, &process), 1.into_process(&process), 3.into_process(&process))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Seeds for failure cases proptest has generated in the past. It is
2+
# automatically read and these particular cases re-run before any
3+
# novel cases are generated.
4+
#
5+
# It is recommended to check this file in to source control so that
6+
# everyone who runs the test benefits from these saved cases.
7+
cc c307b09832fb1b34a66ad2d036c2d93216549be2ca44feb2dc0199a41d1811ee # shrinks to (Term::subbinary(Term::slice_to_binary(&[0], &process), 0, 0, 0, 1, &process), 1.into_process(&process), -1.into_process(&process))
8+
cc bbee067cbb166416830e49bcab081cb4464b05bc317ce1200f9a23edcc667169 # shrinks to (Term::subbinary(Term::slice_to_binary(&[0], &process), 0, 0, 0, 1, &process), 0.into_process(&process), 1.into_process(&process))

0 commit comments

Comments
 (0)