Weird test_meshfunc behavior
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Libpspio |
Fix Committed
|
High
|
Micael Oliveira |
Bug Description
When I move tests around I get different values for the f1 and f1' and f1'' in test_meshfunc.
Fragment from the diff:
eid = pspio_meshfunc_
eid = pspio_error_
+ //
+ DEBUG_PRINT(
+ pspio_meshfunc_
+ DEBUG_PRINT(
+ DEBUG_PRINT(
+ pspio_meshfunc_
+ DEBUG_PRINT(
+ DEBUG_PRINT(
+ pspio_meshfunc_
+ DEBUG_PRINT(
+ //
Output:
test_meshfunc: setting f1
test_meshfunc: evaluating f1 at r=0.850000
test_meshfunc: result=289.000000
test_meshfunc: evaluating first derivative of f1 at r=0.850000
test_meshfunc: result=690.797296
test_meshfunc: evaluating second derivative of f1 at r=0.850000
test_meshfunc: result=677.545347
test_meshfunc: setting f2 with explicit derivative
test_meshfunc: copying f1 to a NULL f3
test_meshfunc: copying f1 to a non-empty f3
test_meshfunc: evaluating f1 at r=0.850000
test_meshfunc: result=289.000000
test_meshfunc: evaluating f2 at r=0.850000
test_meshfunc: result=289.000000
test_meshfunc: evaluating first derivative of f1 at r=0.850000
test_meshfunc: result=340.000000
test_meshfunc: evaluating first derivative of f2 at r=0.850000
test_meshfunc: result=340.000000
test_meshfunc: evaluating second derivative of f1 at r=0.850000
test_meshfunc: result=400.000000
test_meshfunc: evaluating second derivative of f2 at r=0.850000
test_meshfunc: result=400.000000
Is it a bug or am I missing something?
Attaching bzr diff.
Thanks.
Changed in libpspio: | |
importance: | Undecided → High |
assignee: | nobody → Micael Oliveira (micaeljtoliveira) |
milestone: | none → 0.2.0 |
tags: | added: unit-tests |
This is not a bug, but a typo in the test. This is the fix:
DEBUG_ PRINT(" test_meshfunc: setting f2 with explicit derivative\n"); pspio_meshfunc_ set(&f1, m1, f, fp, NULL), PSPIO_SUCCESS); pspio_meshfunc_ set(&f2, m1, f, fp, NULL), PSPIO_SUCCESS);
- CHECK_STAT(
- DEBUG_PRINT("\n");
+ CHECK_STAT(
+ DEBUG_PRINT("\n");