MCPcopy Create free account
hub / github.com/dtolnay/rustversion / test_parse

Function test_parse

tests/test_parse.rs:10–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9#[test]
10fn test_parse() {
11 let cases = &[
12 (
13 "rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14)",
14 Version {
15 minor: 0,
16 patch: 0,
17 channel: Stable,
18 },
19 ),
20 (
21 "rustc 1.18.0",
22 Version {
23 minor: 18,
24 patch: 0,
25 channel: Stable,
26 },
27 ),
28 (
29 "rustc 1.24.1 (d3ae9a9e0 2018-02-27)",
30 Version {
31 minor: 24,
32 patch: 1,
33 channel: Stable,
34 },
35 ),
36 (
37 "rustc 1.35.0-beta.3 (c13114dc8 2019-04-27)",
38 Version {
39 minor: 35,
40 patch: 0,
41 channel: Beta,
42 },
43 ),
44 (
45 "rustc 1.36.0-nightly (938d4ffe1 2019-04-27)",
46 Version {
47 minor: 36,
48 patch: 0,
49 channel: Nightly(Date {
50 year: 2019,
51 month: 4,
52 day: 27,
53 }),
54 },
55 ),
56 (
57 "rustc 1.36.0-dev",
58 Version {
59 minor: 36,
60 patch: 0,
61 channel: Dev,
62 },
63 ),
64 (
65 "rustc 1.36.0-nightly",
66 Version {
67 minor: 36,

Callers

nothing calls this directly

Calls 1

parseFunction · 0.50

Tested by

no test coverage detected