Closed Onur101010 closed 4 years ago
t. You could create two folders that we will add into the set of validations files, name it like the others files with some fail and pass file
No not yet, okay I'll start and keep you updated.
Is it sufficient that the first activated package of the document with no validation leads the constraint to be broken? Or do we want to have all packages to have no support to break the constraint 70001?
Okay perfect, then you can maybe doublecheck the validator with the new folders, it seems to work now.
Yes, it is working but I would like, as an exercise that you put the two ValidationFunctions into one to see if you understood correctly how it is working and to show later on an example of a ValidationFunction that handle several validation errors at the same time.
On Tue, 7 Apr 2020 at 15:39, Onur101010 notifications@github.com wrote:
Okay perfect, then you can maybe doublecheck the validator with the new folders, it seems to work now.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sbmlteam/jsbml/pull/206#issuecomment-610426138, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMVB4LMEXNZPMR7HVOBBULRLM3LZANCNFSM4L27KESA .
Is something like this what you mean ? Both error codes use same function now. Or do you want to validate partial support and no support codes in one go?
You are almost there. Here, you are re-using the same ValidationFunction twice, which is already good. What I want is to have only one ValidationFunction, called only once (meaning, you can remove the 'case CORE_70002:'). And then, in the implementation of the validationFunction, you are not allowed to test for the error code or to use CORE_70001 or CORE_70002 !
Perfect, see how it make the method much simpler.
Last small details, please add a small comment(s) to explain that you are doing both errors in the same method. Also, you now can remove CORE_70002 from addErrorCodesForCheck.
Have you tested it with several xml files to see if the proper error is thrown and if it is not thrown when it should not. You could create two folders that we will add into the set of validations files, name it like the others files with some fail and pass files