|
470 | 470 | @test_throws ErrorException set_indexing_prop!(dG, 4, :name, "dgnode_3") |
471 | 471 | @test_throws ErrorException set_prop!(G, 4, :name, "gnode_3") |
472 | 472 | @test_throws ErrorException set_prop!(dG, 4, :name, "dgnode_3") |
473 | | - @test_throws ErrorException set_props!(G, 5, Dict(:name => "name", :other_name => "something")) |
474 | | - @test_throws ErrorException set_props!(dG, 5, Dict(:name => "name", :other_name => "something")) |
| 473 | + |
| 474 | + @test MetaGraphs.index_available(G, 7, :name, "gnode_8") == false |
| 475 | + @test MetaGraphs.index_available(G, 7, :name, "gnode_7") == true |
| 476 | + @test MetaGraphs.index_available(G, 7, :another_prop, "gnode_8") == true |
| 477 | + @test MetaGraphs.index_available(G, 7, :name, "gnode_8-anothername") == true |
| 478 | + |
| 479 | + @test MetaGraphs.index_available(dG, 7, :name, "dgnode_8") == false |
| 480 | + @test MetaGraphs.index_available(dG, 7, :name, "dgnode_7") == true |
| 481 | + @test MetaGraphs.index_available(dG, 7, :another_prop, "dgnode_8") == true |
| 482 | + @test MetaGraphs.index_available(dG, 7, :name, "dgnode_8-anothername") == true |
| 483 | + |
| 484 | + @test_throws ErrorException set_props!(G, 11, Dict(:name => "gnode_3", :other_name => "something11")) |
| 485 | + @test_throws ErrorException set_props!(dG,11, Dict(:name => "dgnode_3", :other_name => "something11")) |
| 486 | + @test_throws KeyError get_prop(G, 11, :other_name) |
| 487 | + @test_throws KeyError get_prop(dG, 11, :other_name) |
| 488 | + |
| 489 | + @test set_props!(G, 5, Dict(:name => "name5", :other_name => "something")) |
| 490 | + @test set_props!(dG, 5, Dict(:name => "dname5", :other_name => "something")) |
| 491 | + @test G["name5", :name] == 5 |
| 492 | + @test dG["dname5", :name] == 5 |
| 493 | + |
475 | 494 |
|
476 | 495 | @info("Ignore \"'foo1' is already in index\" warnings") |
477 | 496 | set_indexing_prop!(G, 50, :name, "another name") |
|
0 commit comments