@@ -18,9 +18,15 @@ fn test_now_fn_returns_timestamp() {
1818 let timestamp = result. as_i64 ( ) . unwrap ( ) ;
1919
2020 // Should be a reasonable Unix timestamp (after 2020-01-01)
21- assert ! ( timestamp > 1577836800 , "Timestamp should be after 2020-01-01" ) ;
21+ assert ! (
22+ timestamp > 1577836800 ,
23+ "Timestamp should be after 2020-01-01"
24+ ) ;
2225 // Should be before 2100-01-01
23- assert ! ( timestamp < 4102444800 , "Timestamp should be before 2100-01-01" ) ;
26+ assert ! (
27+ timestamp < 4102444800 ,
28+ "Timestamp should be before 2100-01-01"
29+ ) ;
2430}
2531
2632#[ test]
@@ -29,7 +35,10 @@ fn test_now_fn_returns_integer() {
2935
3036 // Should be an integer, not a string
3137 assert ! ( result. as_i64( ) . is_some( ) , "now() should return an integer" ) ;
32- assert ! ( result. as_str( ) . is_none( ) , "now() should not return a string" ) ;
38+ assert ! (
39+ result. as_str( ) . is_none( ) ,
40+ "now() should not return a string"
41+ ) ;
3342}
3443
3544#[ test]
@@ -42,7 +51,12 @@ fn test_now_fn_monotonic() {
4251 let result2 = now_fn ( empty_kwargs ( ) ) . unwrap ( ) ;
4352 let ts2 = result2. as_i64 ( ) . unwrap ( ) ;
4453
45- assert ! ( ts2 >= ts1, "Timestamps should be monotonic: {} >= {}" , ts2, ts1) ;
54+ assert ! (
55+ ts2 >= ts1,
56+ "Timestamps should be monotonic: {} >= {}" ,
57+ ts2,
58+ ts1
59+ ) ;
4660}
4761
4862// ==================== now() with format parameter ====================
@@ -55,8 +69,14 @@ fn test_now_fn_with_format_date_only() {
5569 // Should match YYYY-MM-DD pattern
5670 assert_eq ! ( formatted. len( ) , 10 , "Date format should be 10 chars" ) ;
5771 assert ! ( formatted. contains( '-' ) , "Should contain date separators" ) ;
58- assert ! ( !formatted. contains( 'T' ) , "Should not contain time separator" ) ;
59- assert ! ( !formatted. contains( ':' ) , "Should not contain time separators" ) ;
72+ assert ! (
73+ !formatted. contains( 'T' ) ,
74+ "Should not contain time separator"
75+ ) ;
76+ assert ! (
77+ !formatted. contains( ':' ) ,
78+ "Should not contain time separators"
79+ ) ;
6080}
6181
6282#[ test]
@@ -66,7 +86,10 @@ fn test_now_fn_with_format_datetime() {
6686
6787 // Should match YYYY-MM-DD HH:MM:SS pattern (19 chars)
6888 assert_eq ! ( formatted. len( ) , 19 , "DateTime format should be 19 chars" ) ;
69- assert ! ( formatted. contains( ' ' ) , "Should contain space between date and time" ) ;
89+ assert ! (
90+ formatted. contains( ' ' ) ,
91+ "Should contain space between date and time"
92+ ) ;
7093 assert ! ( formatted. contains( ':' ) , "Should contain time separators" ) ;
7194}
7295
@@ -87,15 +110,22 @@ fn test_now_fn_with_format_year_only() {
87110
88111 assert_eq ! ( formatted. len( ) , 4 , "Year should be 4 digits" ) ;
89112 let year: i32 = formatted. parse ( ) . unwrap ( ) ;
90- assert ! ( ( 2020 ..=2100 ) . contains( & year) , "Year should be reasonable: {}" , year) ;
113+ assert ! (
114+ ( 2020 ..=2100 ) . contains( & year) ,
115+ "Year should be reasonable: {}" ,
116+ year
117+ ) ;
91118}
92119
93120#[ test]
94121fn test_now_fn_with_format_returns_string ( ) {
95122 let result = now_fn ( kwargs_with_format ( "%Y-%m-%d" ) ) . unwrap ( ) ;
96123
97124 // With format, should return a string
98- assert ! ( result. as_str( ) . is_some( ) , "now(format=...) should return a string" ) ;
125+ assert ! (
126+ result. as_str( ) . is_some( ) ,
127+ "now(format=...) should return a string"
128+ ) ;
99129}
100130
101131#[ test]
0 commit comments