Skip to content
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

Add hedID validation tests #608

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
]
]
}
}
}
]