mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
Update bindings to include newer APIs (#250)
- c, cpp - csharp - ffi - go - Java - Python - WASM `arc` feature is turned on for all bindings Use pretty string instead of colored string. Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
33fe9d5039
commit
d09c445add
@@ -72,7 +72,7 @@ impl Engine {
|
||||
}
|
||||
|
||||
fn add_data_from_json_file(&self, path: String) -> Result<(), Error> {
|
||||
let json_data = regorus::Value::from_json_file(&path).map_err(|e| {
|
||||
let json_data = regorus::Value::from_json_file(path).map_err(|e| {
|
||||
Error::new(
|
||||
runtime_error(),
|
||||
format!("Failed to parse JSON data file: {}", e),
|
||||
@@ -112,7 +112,7 @@ impl Engine {
|
||||
}
|
||||
|
||||
fn add_input_from_json_file(&self, path: String) -> Result<(), Error> {
|
||||
let json_data = regorus::Value::from_json_file(&path).map_err(|e| {
|
||||
let json_data = regorus::Value::from_json_file(path).map_err(|e| {
|
||||
Error::new(
|
||||
runtime_error(),
|
||||
format!("Failed to parse JSON input file: {}", e),
|
||||
@@ -193,7 +193,8 @@ impl Engine {
|
||||
}
|
||||
|
||||
fn set_enable_coverage(&self, enable: bool) -> Result<(), Error> {
|
||||
Ok(self.engine.borrow_mut().set_enable_coverage(enable))
|
||||
self.engine.borrow_mut().set_enable_coverage(enable);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn get_coverage_report_as_json(&self) -> Result<String, Error> {
|
||||
@@ -237,12 +238,14 @@ impl Engine {
|
||||
}
|
||||
|
||||
fn clear_coverage_data(&self) -> Result<(), Error> {
|
||||
Ok(self.engine.borrow_mut().clear_coverage_data())
|
||||
self.engine.borrow_mut().clear_coverage_data();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// Print statements can be gathered async instead of printing to stderr
|
||||
fn set_gather_prints(&self, enable: bool) -> Result<(), Error> {
|
||||
Ok(self.engine.borrow_mut().set_gather_prints(enable))
|
||||
self.engine.borrow_mut().set_gather_prints(enable);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn take_prints(&self) -> Result<Vec<String>, Error> {
|
||||
|
||||
Reference in New Issue
Block a user