🧪 Add evaluation tests to ensure that passes retain NGR semantics. #2
@@ -1,8 +1,9 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
void print(char *_ignore, char *variable_name, uint64_t value) {
|
void print(char *_ignore, char *variable_name, int64_t value) {
|
||||||
printf("%s = %llii64\n", variable_name, value);
|
printf("%s = %" PRId64 "i64\n", variable_name, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void caller() {
|
void caller() {
|
||||||
|
|||||||
@@ -83,6 +83,9 @@ proptest::proptest! {
|
|||||||
|
|
||||||
let basic_result = program.eval();
|
let basic_result = program.eval();
|
||||||
|
|
||||||
|
#[cfg(target_family="windows")]
|
||||||
|
let basic_result = basic_result.map(|x| x.replace('\n', "\r\n"));
|
||||||
|
|
||||||
if !matches!(basic_result, Err(EvalError::PrimOp(PrimOpError::MathFailure(_)))) {
|
if !matches!(basic_result, Err(EvalError::PrimOp(PrimOpError::MathFailure(_)))) {
|
||||||
let compiled_result = Backend::<ObjectModule>::eval(program);
|
let compiled_result = Backend::<ObjectModule>::eval(program);
|
||||||
assert_eq!(basic_result, compiled_result);
|
assert_eq!(basic_result, compiled_result);
|
||||||
|
|||||||
Reference in New Issue
Block a user