| 1 |
# Test fixture for Magik language |
| 2 |
# This file covers various comment and code patterns |
| 3 |
|
| 4 |
_package user |
| 5 |
$ |
| 6 |
|
| 7 |
# Full line comment before code |
| 8 |
_pragma(classify_level=basic, topic={test}) |
| 9 |
_method char16_vector.test_method() |
| 10 |
## Method documentation |
| 11 |
## @return {_self} |
| 12 |
_if _self.size < 2 |
| 13 |
_then |
| 14 |
_return _self.lowercase |
| 15 |
_endif |
| 16 |
|
| 17 |
_local str << _self # end of line comment |
| 18 |
|
| 19 |
# Another comment |
| 20 |
_local regex << /([A-Z]+)([A-Z][a-z])/ |
| 21 |
str << regex.replace_all(str, "$1_$2") |
| 22 |
|
| 23 |
_return str.lowercase |
| 24 |
_endmethod |
| 25 |
$ |
| 26 |
|
| 27 |
# Block comment |
| 28 |
_block |
| 29 |
_local l_path << system.pathname_down("test", "path") |
| 30 |
load_file(l_path) |
| 31 |
_endblock |
| 32 |
$ |
| 33 |
|
| 34 |
# Define an exemplar |
| 35 |
def_slotted_exemplar( |
| 36 |
:test_exemplar, |
| 37 |
{ |
| 38 |
{:field1, _unset}, |
| 39 |
{:field2, _unset} # inline comment |
| 40 |
}) |
| 41 |
$ |