File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright 2025 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ #![ no_std]
16
+
17
+ /// A simple, no_std function.
18
+ fn no_std_identity ( value : u32 ) -> u32 {
19
+ value
20
+ }
21
+
22
+ #[ cfg( test) ]
23
+ mod tests {
24
+ use super :: * ;
25
+ use googletest:: prelude:: * ;
26
+
27
+ #[ gtest]
28
+ fn no_std_verify ( ) -> Result < ( ) > {
29
+ verify_eq ! ( no_std_identity( 42 ) , 42 ) ?;
30
+ Ok ( ( ) )
31
+ }
32
+
33
+ #[ gtest]
34
+ fn no_std_expect ( ) {
35
+ expect_eq ! ( no_std_identity( 214 ) , 214 )
36
+ }
37
+ }
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ pub fn gtest(
105
105
. unwrap_or_else ( ||
106
106
(
107
107
quote ! { Ok ( ( ) ) } ,
108
- quote ! { :: std :: result:: Result <( ) , googletest:: internal:: test_outcome:: TestFailure > } ,
108
+ quote ! { :: core :: result:: Result <( ) , googletest:: internal:: test_outcome:: TestFailure > } ,
109
109
quote ! { } ,
110
110
) ) ;
111
111
You can’t perform that action at this time.
0 commit comments