How do I test the Examples provided in the Introduction to Daml section

Hi Team,

I am trying to test the below code by clicking out “script result” section. I can see the contracts created or tested, but when I try the below code. I don;t see any output in the test screen. Am I doing the correct thing.

image
image

1 Like

Hi @rajesh

Your code works as expected. There is no output of the script in this case. This example is about a certain data type and no template defined to evaluate yet. Go ahead with other examples to check the script functionality.

1 Like

If you want to convince yourself that this works as expected, you could add a line

  debug "success!"

at the end of your tuple_test script. That should appear in the transaction view.

3 Likes

The current way of displaying this is definitely very confusing. I’ve opened Issues · digital-asset/daml · GitHub improve this.

3 Likes

Hi @Gary_Verhaegen

For correct operation, I had to format that debug message as:

debug = "Success!" <- Hard-left align.

Great tips, thanks :+1:t2: