Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ec51281

Browse filesBrowse files
author
Alberto Ruiz
committed
Move main.rs to lib.rs in test-runner
1 parent 2e49270 commit ec51281
Copy full SHA for ec51281

File tree

Expand file treeCollapse file tree

1 file changed

+20
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+20
-0
lines changed

‎test-runner/src/lib.rs

Copy file name to clipboard
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
extern crate ieee1275_rs;
2+
#[cfg(test)]
3+
mod tests {
4+
use ieee1275_rs::ServiceArgs;
5+
use ieee1275_rs::PROM;
6+
7+
struct MOCK_PROM {
8+
9+
}
10+
11+
extern "C" fn mock_entry (_args: *mut ServiceArgs) -> usize {
12+
0
13+
}
14+
15+
#[test]
16+
fn find_device () {
17+
let PROM = PROM::new(mock_entry);
18+
PROM.find_device("/chosen");
19+
}
20+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.