update gtest.sh

This commit is contained in:
lyon1998 2022-04-20 18:44:26 +08:00
parent c323931050
commit bffb69cc7c
3 changed files with 1 additions and 54 deletions

View File

@ -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

View File

@ -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"
);
}
}

View File

@ -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")
);
}
}