File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818#![ deny( unsafe_code) ]
1919#![ deny( clippy:: debug_assert_with_mut_call) ]
2020
21+ pub mod version;
2122pub mod bytecode_circuit;
2223pub mod copy_circuit;
2324pub mod evm_circuit;
Original file line number Diff line number Diff line change 1+ /// Version
2+ pub mod version {
3+ /// Major version
4+ pub const MAJOR : u32 = 0 ;
5+ /// Minor version
6+ pub const MINOR : u32 = 1 ;
7+ /// Patch version
8+ pub const PATCH : u32 = 0 ;
9+
10+ /// Export versions as string
11+ pub fn as_string ( ) -> String {
12+ format ! ( "{}.{}.{}" , MAJOR , MINOR , PATCH )
13+ }
14+ }
15+
16+ mod tests {
17+ use crate :: version:: version;
18+
19+ #[ test]
20+ fn test_version_string ( ) {
21+ let expected = "0.1.0" ;
22+
23+ assert_eq ! ( version:: MAJOR , 0 , "wrong version" ) ;
24+ assert_eq ! ( version:: MINOR , 1 , "wrong version" ) ;
25+ assert_eq ! ( version:: PATCH , 0 , "wrong version" ) ;
26+ assert_eq ! ( version:: as_string( ) , expected, "wrong version" ) ;
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments