Fixed missprint with var negation (4)

This commit is contained in:
2020-02-24 22:48:55 +03:00
parent 8ce723d062
commit 5badb6b27d
2 changed files with 3 additions and 1 deletions

View File

@@ -102,7 +102,7 @@ class Function {
case 4:
mask = mask_4;
remains = remains_4;
shift = shift_3;
shift = shift_4;
break;
default:
assert(false);

View File

@@ -42,6 +42,8 @@ void test_function() {
assert(("f(x_1 + 1 + 1, x_2, x_3) == f", negation == negation.var_negation(1).var_negation(1)));
assert(("f(x_1, x_2 + 1 + 1, x_3) == f", negation == negation.var_negation(2).var_negation(2)));
assert(("f(x_1, x_2, x_3 + 1 + 1) == f", negation == negation.var_negation(3).var_negation(3)));
assert((Function<uint16_t, 16>("0000000100010111").var_negation(1).string() == "0000001000101011"));
assert((Function<uint16_t, 16>("0000000100010111").var_negation(4).string() == "0001011100000001"));
/*
cout << "f(x_1, x_2, x_3) = " << negation.string() << endl;
cout << "f(x_1 + 1, x_2, x_3) = " << negation.var_negation(1).string() << endl;