Skip to content

Commit

Permalink
Change 'composed-type' to 'composedtype' in test specs
Browse files Browse the repository at this point in the history
The dash causes difficulties in PHP.

(I thought the dash might be a bad idea when I created the tests
originally, but for some reason I kept it anyway...)
  • Loading branch information
tamias committed Mar 9, 2011
1 parent 32fdd35 commit 100c5a5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions perl/t/lib/Test/RxSpec.pm
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,20 @@ sub test_spec {

my $rx = Data::Rx->new;

if ($schema_test->{'composed-type'}) {
if ($schema_test->{'composedtype'}) {
my $rc =
eval { $rx->learn_type($schema_test->{'composed-type'}{'uri'},
$schema_test->{'composed-type'}{'schema'});
eval { $rx->learn_type($schema_test->{'composedtype'}{'uri'},
$schema_test->{'composedtype'}{'schema'});
1 };
my $error = $@;

if ($schema_test->{'composed-type'}{'invalid'}) {
if ($schema_test->{'composedtype'}{'invalid'}) {
ok($error && !$rc, "BAD COMPOSED TYPE: $schema_fn");
return;
}

$rx->add_prefix(@{$schema_test->{'composed-type'}{'prefix'}})
if $schema_test->{'composed-type'}{'prefix'};
$rx->add_prefix(@{$schema_test->{'composedtype'}{'prefix'}})
if $schema_test->{'composedtype'}{'prefix'};
}

my $schema = eval { $rx->make_schema($schema_test->{schema}) };
Expand Down
2 changes: 1 addition & 1 deletion spec/schemata/composed-person-prefix.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"composed-type": {
"composedtype": {
"uri": "tag:www.example.com:types/rx/person",
"prefix": ["example", "tag:www.example.com:types/rx/"],
"schema": {
Expand Down
2 changes: 1 addition & 1 deletion spec/schemata/composed-person.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"composed-type": {
"composedtype": {
"uri": "tag:www.example.com:types/rx/person",
"schema": {
"type": "//rec",
Expand Down
2 changes: 1 addition & 1 deletion spec/schemata/invalid/composed-cycle.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"composed-type": {
"composedtype": {
"uri": "tag:www.example.com:rx/cycle",
"schema": {
"type": "tag:www.example.com:rx/cycle"
Expand Down
2 changes: 1 addition & 1 deletion spec/schemata/invalid/composed-invalid.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"composed-type": {
"composedtype": {
"uri": "tag:www.example.com:rx/person",
"schema": {
"type": "//rec",
Expand Down
2 changes: 1 addition & 1 deletion spec/schemata/invalid/composed-unknown-arg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"composed-type": {
"composedtype": {
"uri": "tag:www.example.com:rx/person",
"schema": {
"type": "//rec",
Expand Down

0 comments on commit 100c5a5

Please sign in to comment.