LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unit test framework enum input?

Hi,

 

I have just decided to play around with the Unit Test Framework just to see if thats something I'd like to utilize in the future, but right after 5 minutes I have faced a problem I couldnt solve: enum inputs are displayed as U16 instead of the their readable format. See the screenshot below. The Action input is an enum with "Add", "Subtract", "Divide", but I only see it as a number. That makes it quite useless cause then I need to remember with Action has which number. I'm pretty sure that there is a workaround, or maybe my first approach to unit test is wrong, so pls advise.

 

Thx!

 

1984_1-1650963832330.png

 

Message 1 of 6
(1,005 Views)

Is the enum a typedef?


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 6
(971 Views)

No it was not a typedef, but making it a typedef doesn't make a difference. Its still a U16 in the UTF.

0 Kudos
Message 3 of 6
(941 Views)

Did you relink the vi after saving the typedef and vi?


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 6
(921 Views)

There is nothing to relink. The UTF loads the VI connector pane everytime I doubleclick on the lvtest file.

 

But just to be 131% sure I have created a new test based on the VI now having a typedef'd input. No change, enum still shows up as a number.

0 Kudos
Message 5 of 6
(905 Views)

I have opened the "Code coverage.lvproj" from the find examples window. It shows exactly the same, enums show up only as numbers and not in a readable format.

 

Now I understand why nobody I know uses the unit test framework.

0 Kudos
Message 6 of 6
(872 Views)