use crate::tests::bc::golden::bc_golden_test;
#[test]
fn test_no_loop_if_top_collection_is_empty() {
bc_golden_test(
"compr_no_loop_if_top_collection_is_empty",
"def test(): return [x for x in []]",
);
}
#[test]
fn test_no_loop_if_top_collection_is_empty_on_freeze() {
bc_golden_test(
"compr_no_loop_if_top_collection_is_empty_on_freeze",
"def test(): return [x for x in D]\nD = {}",
);
}
#[test]
fn test_if_true_clause() {
bc_golden_test(
"compr_if_true_clause",
"def test(y): return [x for x in y if True]",
);
}
#[test]
fn test_if_true_clause_on_freeze() {
bc_golden_test(
"compr_if_true_clause_on_freeze",
"def test(y): return [x for x in y if C]\nC = False\nC = True",
);
}