Skip to content

Commit

Permalink
Fix Gradient/SwitchInit test
Browse files Browse the repository at this point in the history
  • Loading branch information
MihailMihov committed Mar 19, 2024
1 parent 0327001 commit 6ee2e26
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/Gradient/SwitchInit.C
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %cladclang %s -I%S/../../include -std=c++17 -oSwitchInit.out 2>&1 -lstdc++ -lm | FileCheck %s
// RUN: ./SwitchInit.out | FileCheck -check-prefix=CHECK-EXEC %s
//CHECK-NOT: {{.*error|warning|note:.*}}
// XFAIL: target={{i586.*}}

#include "clad/Differentiator/Differentiator.h"

Expand All @@ -23,7 +22,7 @@ double fn1(double i, double j) {
// CHECK-NEXT: int count = 0;
// CHECK-NEXT: int _cond0;
// CHECK-NEXT: double _t0;
// CHECK-NEXT: clad::tape<unsigned long> _t1 = {};
// CHECK-NEXT: clad::tape<unsigned {{int|long}}> _t1 = {};
// CHECK-NEXT: double _t2;
// CHECK-NEXT: double _t3;
// CHECK-NEXT: double _t4;
Expand All @@ -38,7 +37,7 @@ double fn1(double i, double j) {
// CHECK-NEXT: _t0 = res;
// CHECK-NEXT: }
// CHECK-NEXT: {
// CHECK-NEXT: clad::push(_t1, 1UL);
// CHECK-NEXT: clad::push(_t1, {{1U|1UL}});
// CHECK-NEXT: break;
// CHECK-NEXT: }
// CHECK-NEXT: {
Expand All @@ -58,15 +57,15 @@ double fn1(double i, double j) {
// CHECK-NEXT: res += i * i * j * j;
// CHECK-NEXT: _t4 = res;
// CHECK-NEXT: }
// CHECK-NEXT: clad::push(_t1, 2UL);
// CHECK-NEXT: clad::push(_t1, {{2U|2UL}});
// CHECK-NEXT: }
// CHECK-NEXT: }
// CHECK-NEXT: goto _label0;
// CHECK-NEXT: _label0:
// CHECK-NEXT: _d_res += 1;
// CHECK-NEXT: {
// CHECK-NEXT: switch (clad::pop(_t1)) {
// CHECK-NEXT: case 2UL:
// CHECK-NEXT: case {{2U|2UL}}:
// CHECK-NEXT: ;
// CHECK-NEXT: {
// CHECK-NEXT: {
Expand Down Expand Up @@ -102,7 +101,7 @@ double fn1(double i, double j) {
// CHECK-NEXT: if (1 == _cond0)
// CHECK-NEXT: break;
// CHECK-NEXT: }
// CHECK-NEXT: case 1UL:
// CHECK-NEXT: case {{1U|1UL}}:
// CHECK-NEXT: ;
// CHECK-NEXT: {
// CHECK-NEXT: {
Expand Down Expand Up @@ -131,4 +130,4 @@ int main() {
clad::array_ref<double> result_ref(result, 2);

TEST_2(fn1, 3, 5); // CHECK-EXEC: {156.00, 100.00}
}
}

0 comments on commit 6ee2e26

Please sign in to comment.