File: 100-meta6-issue-22.t

package info (click to toggle)
raku-json-marshal 0.0.25-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: makefile: 4
file content (23 lines) | stat: -rw-r--r-- 387 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env raku


use Test;

use JSON::Marshal;

my class TestClass22 {
    has Version $.perl-version is rw is marshalled-by('Str') is json-name('perl');
}

my $obj;

lives-ok { $obj = TestClass22.new }, "create object with json-name and marshalled-by attribute not provided";

my $json;

lives-ok { $json = marshal($obj) }, "and try to marshal it";


done-testing;

# vim: ft=raku