Benign cargo Download

tests.rs

Rust inline tests module pathRust test marker or harness
SHA-256a4e051d2008f2ab4454ea562dc6b23e0a80bf226fde98f24abb37415436a6793

Evidence

English function-word token "the" lines 1–3
1//! Licensed under the Apache License, Version 2.0
2//! http://www.apache.org/licenses/LICENSE-2.0 or the MIT license
3/ …
imports it::Zip lines 8–22
8:16… ertools as it;
9extern crate permutohedron;
10
11use it::Itertools;
12use it::Interleave;
13use it::Zip;
14
15#[test]
16fn product2() {
17 let s = "αβ";
⋯5 lines
Contains Hangul script lines 186–190
186:20… linspace::<f32>(0., -2., 4);
187 it::assert_equal(iter, vec![0., -0.666666666667, -1.333333333333, -2.]);
188
189 let iter = it::linspace::<f32>(0., -2., 4);
190 it::assert_equal(iter.rev(), vec![-2., -1.333 …
imports std::collections::BTreeMap lines 383–392
383:42… er());
384}
385
386#[test]
387fn merge_by_btree() {
388 use std::collections::BTreeMap;
389 let mut bt1 = BTreeMap::new();
390 bt1.insert("hello", 1);
391 bt1.insert("world", 3);
392 …
imports std::cell::Cell lines 461–469
461:13… that RepeatN only clones N - 1 times.
462
463 use std::cell::Cell;
464 #[derive(PartialEq, Debug)]
465 struct Foo {
⋯4 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.