Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Unit testing?
I only just noticed there was a new editor version.
What is 'Unit Testing'
What is 'Unit Testing'
Comments
also
File->New->Item->Test Module:
function Test_{NAME}(@Test)
does {NAME} imply that you manually change
Sorry if I am missing something obvious here.
Is there any post about these new features?
Stay tuned and we'll provide more information as soon as we return and are able to settle in. In the meantime, you can get introduced to the concept of unit testing with this Wikipedia article.
To start, yes {NAME} does imply that this is where you will enter the name of your unit test module. Here is an example of a unit test I have named (and compiled), Test_Sample. Note that I have exposed the Unit Test Panel on the right side of the SRP Editor by pressing F10.
Essentially the idea is that you use the "Assert" keyword at the end of any given test that you write to determine if the result of your code within the test equals what you are expecting it to equal.
Next, if you scroll down within the Unit Test Panel you will see that the SRP Editor has added a collapsible entry with my new "Sample" test module. If you right click on a given test, you can run that single test and view the results in the status window on the bottom of the SRP Editor. Here we see that our SampleSuccess test passed since we Asserted that Value (which holds the value 1) equals 1.
You can also run all tests in every compiled test module by right clicking any test in the Unit Test Panel and selecting "Run All."
Finally, you can alternatively run a test within a test module that you have open and active by pressing the execute button or by pressing F9.
Let me know if you have additional questions.
Cheers 🍻
Is the code in the ssp new stuff that has been added to the Srp_Precompiler, or has it been there all along?
Which brings me to - Is there any single place documentation on the commands\format for Srp_PreCompiler
>>Documentation for both Extended BASIC+
I came across this and now I cant find it.
Can you point to where it is please.
Yes, I know that it is the srputils that does most of the heavy lifting so that you dont need Srp editor for most of the functions.