Skip to content

Commit a4a7e90

Browse files
committed
Add CI test for generated setters
1 parent 6f1943b commit a4a7e90

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

.github/workflows/rust.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,29 @@ jobs:
8787
with:
8888
command: test
8989
args: --features serde
90+
91+
test_setters:
92+
name: TestSetters
93+
runs-on: ${{ matrix.config.os }}
94+
strategy:
95+
fail-fast: false
96+
matrix:
97+
config:
98+
- { os: ubuntu-latest, target: 'x86_64-unknown-linux-gnu' }
99+
- { os: macos-latest, target: 'x86_64-apple-darwin' }
100+
- { os: windows-latest, target: 'x86_64-pc-windows-msvc' }
101+
102+
steps:
103+
- uses: actions/checkout@v2
104+
- uses: actions-rs/toolchain@v1
105+
with:
106+
toolchain: stable
107+
target: ${{ matrix.config.target }}
108+
override: true
109+
- uses: actions-rs/cargo@v1
110+
with:
111+
command: test
112+
args: --features generated_setters
90113

91114
test_min:
92115
name: TestMin

tests/integration.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ fn test_key_value() {
501501
assert_eq_unordered!(diffed.test1, second.test1);
502502
}
503503

504+
#[cfg(not(feature = "nanoserde"))]
504505
#[cfg(feature = "generated_setters")]
505506
#[test]
506507
fn test_setters() {

tests/types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ impl RandValue for TestEnum {
9494
}
9595
}
9696

97+
#[cfg(not(feature = "nanoserde"))]
9798
#[derive(Difference, Default, PartialEq, Debug, Clone)]
9899
#[difference(setters)]
99100
pub struct TestSetters {
@@ -114,6 +115,7 @@ pub struct TestSetters {
114115
pub f6: BTreeMap<i32, Test>,
115116
}
116117

118+
#[cfg(not(feature = "nanoserde"))]
117119
impl RandValue for TestSetters {
118120
fn next_seeded(rng: &mut WyRand) -> Self {
119121
TestSetters {

0 commit comments

Comments
 (0)