ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

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,910 Views)

Is the enum a typedef?


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 6
(1,876 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
(1,846 Views)

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


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 6
(1,826 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
(1,810 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
(1,777 Views)