unable to reproduce linkage issue (#5912)

This commit is contained in:
Jack May
2019-09-16 14:35:58 -07:00
committed by GitHub
parent d5ba90d375
commit f5964b4f3c
3 changed files with 254 additions and 109 deletions

View File

@@ -33,24 +33,3 @@ pub fn divide(n: i128, d: i128) -> i128 {
pub fn modulo(n: i128, d: i128) -> i128 {
n % d
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn pull_in_externs() {
// Rust on Linux excludes the externs unless there is a
// direct dependency, use this test to force the pull in of the library.
// This is not necessary on macos and unfortunate on Linux
// Issue #4972
use solana_sdk::program_test::*;
unsafe { sol_log_("X".as_ptr(), 1) };
sol_log_64_(1, 2, 3, 4, 5);
}
#[test]
fn test_add() {
assert_eq!(3, add(1, 2));
}
}