mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
update gtest.sh
This commit is contained in:
parent
c323931050
commit
bffb69cc7c
@ -1,3 +1,4 @@
|
||||
sh init.sh
|
||||
cp config/pika_config_default.h config/pika_config.h && sh _gtest_once.sh && \
|
||||
cp config/pika_config_benchmark.h config/pika_config.h && sh _gtest_once.sh && \
|
||||
cp config/pika_config_builtin_list.h config/pika_config.h && sh _gtest_once.sh
|
||||
|
@ -298,30 +298,4 @@ mod tests {
|
||||
"testObj"
|
||||
);
|
||||
}
|
||||
#[test]
|
||||
fn test_push_import() {
|
||||
let mut class_info = ClassInfo::new(
|
||||
&String::from("Pkg"),
|
||||
&String::from("class Test(SuperTest):"),
|
||||
false,
|
||||
)
|
||||
.unwrap();
|
||||
class_info.push_import(String::from("TestObj()"), &"Pkg".to_string());
|
||||
assert_eq!(
|
||||
class_info
|
||||
.import_list
|
||||
.get("Pkg_TestObj")
|
||||
.unwrap()
|
||||
.class_name,
|
||||
"Pkg_Test"
|
||||
);
|
||||
assert_eq!(
|
||||
class_info
|
||||
.import_list
|
||||
.get("Pkg_TestObj")
|
||||
.unwrap()
|
||||
.import_class_name,
|
||||
"Pkg_TestObj"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -35,31 +35,3 @@ impl ImportInfo {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_import_info() {
|
||||
assert_eq!(
|
||||
ImportInfo::new(
|
||||
&String::from("Test"),
|
||||
String::from("ImportTest()"),
|
||||
&"Pkg".to_string()
|
||||
)
|
||||
.unwrap()
|
||||
.import_class_name,
|
||||
String::from("Pkg_ImportTest")
|
||||
);
|
||||
assert_eq!(
|
||||
ImportInfo::new(
|
||||
&String::from("Test"),
|
||||
String::from("ImportTest()"),
|
||||
&"Pkg".to_string()
|
||||
)
|
||||
.unwrap()
|
||||
.class_name,
|
||||
String::from("Test")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user