Skip to content

Commit

Permalink
what does an integration test report?
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisVaughan committed Sep 25, 2024
1 parent eb2240e commit 3495301
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion crates/ark/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ fn main() {
let resource = Path::new("resources")
.join("manifest")
.join("ark-manifest.rc");
embed_resource::compile_for_tests(resource, embed_resource::NONE);
embed_resource::compile(resource, embed_resource::NONE);
}
24 changes: 12 additions & 12 deletions crates/ark/src/data_explorer/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -752,23 +752,23 @@ mod tests {
ColumnValue::FormattedValue("aa".to_string()),
]);

options.max_value_length = 1000;
let text = RObject::from(r#"x <- c("ボルテックス")"#);
unsafe { r_envir_set("text", text.sexp, R_GlobalEnv) };
let data = harp::parse_eval_global(r#"Encoding(text)"#).unwrap();
let data = String::try_from(data).unwrap();
let _ = harp::parse_eval_global(r#"rm(text)"#).unwrap();
assert_eq!(data, "UTF-8".to_string());
// options.max_value_length = 1000;
// let text = RObject::from(r#"x <- c("ボルテックス")"#);
// unsafe { r_envir_set("text", text.sexp, R_GlobalEnv) };
// let data = harp::parse_eval_global(r#"Encoding(text)"#).unwrap();
// let data = String::try_from(data).unwrap();
// let _ = harp::parse_eval_global(r#"rm(text)"#).unwrap();
// assert_eq!(data, "UTF-8".to_string());

// let data = harp::parse_eval_global("Sys.getlocale()").unwrap();
// let data = String::try_from(data).unwrap();
// assert_eq!(data, "wrong".to_string());

let data =
harp::parse_eval_global("paste0(capture.output(sessionInfo()), collapse = ' ')")
.unwrap();
let data = String::try_from(data).unwrap();
assert_eq!(data, "wrong".to_string());
// let data =
// harp::parse_eval_global("paste0(capture.output(sessionInfo()), collapse = ' ')")
// .unwrap();
// let data = String::try_from(data).unwrap();
// assert_eq!(data, "wrong".to_string());

// let _ = harp::parse_eval_global(r#"x <- c("ボルテックス")"#).unwrap();
// let data = harp::parse_eval_global(r#"Encoding(x)"#).unwrap();
Expand Down
5 changes: 5 additions & 0 deletions crates/ark/tests/data_explorer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1808,6 +1808,11 @@ fn test_histogram() {
#[test]
fn test_frequency_table() {
r_test(|| {
let data = harp::parse_eval_global("paste0(capture.output(sessionInfo()), collapse = ' ')")
.unwrap();
let data = String::try_from(data).unwrap();
assert_eq!(data, "wrong".to_string());

let socket =
open_data_explorer_from_expression("data.frame(x = rep(letters[1:10], 10:1))", None)
.unwrap();
Expand Down

0 comments on commit 3495301

Please sign in to comment.