Skip to content

Add ctest-next stub and expected dependencies #4467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ extra_traits = []
[workspace]
members = [
"ctest",
"ctest-next",
"ctest-test",
"libc-test",
]
Expand Down
12 changes: 12 additions & 0 deletions ctest-next/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "ctest-next"
version = "0.1.0"
edition = "2021"
rust-version = "1.77"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also get:

license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/libc"
publish = false

license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/libc"
publish = false

[dependencies]
cc = "1.2.25"
syn = { version = "2.0.101", features = ["full", "visit", "visit-mut", "fold"] }
14 changes: 14 additions & 0 deletions ctest-next/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
Loading