Skip to content

Commit

Permalink
Merge pull request #608 from IanCa/develop
Browse files Browse the repository at this point in the history
Add hedID validation tests
  • Loading branch information
VisLab authored Jul 25, 2024
2 parents 7cf62e5 + 08772fb commit 19b29fe
Showing 1 changed file with 146 additions and 0 deletions.
146 changes: 146 additions & 0 deletions tests/json_tests/SCHEMA_ATTRIBUTE_VALUE_INVALID_HED_ID.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
[
{
"error_code": "SCHEMA_ATTRIBUTE_VALUE_INVALID",
"name": "attribute-invalid-hed-id-changed",
"warning": true,
"description": "A schema value class issue, saying there is an unknown one.",
"schema": "",
"definitions": [],
"tests": {
"schema_tests": {
"fails": [
[
"HED version=\"8.4.0\"",
"'''Prologue'''",
"!# start schema",
"'''Event'''{hedId=HED_0015001}",
"!# end schema",
"'''Unit classes'''",
"'''Unit modifiers'''",
"'''Value classes'''",
"'''Schema attributes'''",
"* hedId {elementDomain}",
"'''Properties'''",
"* elementDomain",
"'''Epilogue'''",
"!# end hed"
]
],
"passes": [
[
"HED version=\"8.4.0\"",
"'''Prologue'''",
"!# start schema",
"'''Event'''{hedId=HED_0012001}",
"!# end schema",
"'''Unit classes'''",
"'''Unit modifiers'''",
"'''Value classes'''",
"'''Schema attributes'''",
"* hedId {elementDomain}",
"'''Properties'''",
"* elementDomain",
"'''Epilogue'''",
"!# end hed"
]
]
}
}
},
{
"error_code": "SCHEMA_ATTRIBUTE_VALUE_INVALID",
"name": "attribute-invalid-hed-id-out-range",
"warning": true,
"description": "A schema value class issue, saying there is an unknown one.",
"schema": "",
"definitions": [],
"tests": {
"schema_tests": {
"fails": [
[
"HED version=\"8.4.0\"",
"'''Prologue'''",
"!# start schema",
"'''NewTagWithNewID'''{hedId=HED_0055000}",
"!# end schema",
"'''Unit classes'''",
"'''Unit modifiers'''",
"'''Value classes'''",
"'''Schema attributes'''",
"* hedId {elementDomain}",
"'''Properties'''",
"* elementDomain",
"'''Epilogue'''",
"!# end hed"
]
],
"passes": [
[
"HED version=\"8.4.0\"",
"'''Prologue'''",
"!# start schema",
"'''NewTagWithNewID'''{hedId=HED_0015001}",
"!# end schema",
"'''Unit classes'''",
"'''Unit modifiers'''",
"'''Value classes'''",
"'''Schema attributes'''",
"* hedId {elementDomain}",
"'''Properties'''",
"* elementDomain",
"'''Epilogue'''",
"!# end hed"
]
]
}
}
},
{
"error_code": "SCHEMA_ATTRIBUTE_VALUE_INVALID",
"name": "attribute-invalid-hed-id-invalid",
"warning": true,
"description": "A schema value class issue, saying there is an unknown one.",
"schema": "",
"definitions": [],
"tests": {
"schema_tests": {
"fails": [
[
"HED version=\"8.4.0\"",
"'''Prologue'''",
"!# start schema",
"'''NewTagWithNewID'''{hedId=HED_XXXXXXX}",
"!# end schema",
"'''Unit classes'''",
"'''Unit modifiers'''",
"'''Value classes'''",
"'''Schema attributes'''",
"* hedId {elementDomain}",
"'''Properties'''",
"* elementDomain",
"'''Epilogue'''",
"!# end hed"
]
],
"passes": [
[
"HED version=\"8.4.0\"",
"'''Prologue'''",
"!# start schema",
"'''NewTagWithNewID'''{hedId=HED_0015001}",
"!# end schema",
"'''Unit classes'''",
"'''Unit modifiers'''",
"'''Value classes'''",
"'''Schema attributes'''",
"* hedId {elementDomain}",
"'''Properties'''",
"* elementDomain",
"'''Epilogue'''",
"!# end hed"
]
]
}
}
}
]

0 comments on commit 19b29fe

Please sign in to comment.