-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Unit test for MC7Converter #58
Added Unit test for MC7Converter #58
Conversation
your tests do not run witha positive resilt ;-( |
but i like this verry much |
Yes I see, forgot to copy the binary files during the build. Sorry for that |
still not workin ;-) |
I dont know what the problem is. The test for FC's are failing for FC100, even though the test output looks fine. This must be some Whitespace or newline problem, where the outputs are the same, but not quite. I deactivated it for the moment. Strange thing is,everything works on my machine. Maybe somebody has an better idea for checking the converter output. |
i will have a look, next week |
OK, I uploaded the project containing the blocks that i used in the unit tests. I think this project should be included in the project |
The Test now is fixed. Was a Problem with numberformat for reals! |
Today I took a little bit of time to extract some MC7 blocks of an Online PLC and write some unit test for the MC7 converter. I reviewed the pre-converted AWL files for correctness (at least superficially).
Of course if the variable numbering scheme for the db's is changed (STAT0 ... STAT1.STATxxx), these tests might break, since i only implemented an quick string comparison.
The new files basically contain various different binary and awl S7Blocks where offline checks can be performed on.
The bin files are plain dumps obtained via an call to "PLCConnection.PLCGetBlockInMC7(...)"
The Awl files are the parsed awl code files for the corresponding files. these files are compared to
default Simatic manager online only output, in order to ensure correctness of the parsing