-
-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added proper support for adding attributes via data.frames (#1716)
- Loading branch information
1 parent
07e0ccb
commit d886780
Showing
4 changed files
with
247 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# error messages work | ||
|
||
Code | ||
set_vertex_attr(g, "test", value = c(1, 2)) | ||
Condition | ||
Error in `i_set_vertex_attr()`: | ||
! Length of new attribute value must be 1 or 5, the number of target vertices, not 2. | ||
|
||
--- | ||
|
||
Code | ||
set_edge_attr(g, "test", value = c(1, 2)) | ||
Condition | ||
Error in `i_set_edge_attr()`: | ||
! Length of new attribute value must be 1 or 10, the number of target edges, not 2. | ||
|
||
--- | ||
|
||
Code | ||
delete_graph_attr(g, "a") | ||
Condition | ||
Error in `delete_graph_attr()`: | ||
! No graph attribute `a` found. | ||
|
||
--- | ||
|
||
Code | ||
delete_vertex_attr(g, "a") | ||
Condition | ||
Error in `delete_vertex_attr()`: | ||
! No vertex attribute `a` found. | ||
|
||
--- | ||
|
||
Code | ||
delete_edge_attr(g, "a") | ||
Condition | ||
Error in `delete_edge_attr()`: | ||
! No edge attribute `a` found. | ||
|
||
--- | ||
|
||
Code | ||
assert_named_list("a") | ||
Condition | ||
Error in `assert_named_list()`: | ||
! `value` must be a named list with unique names | ||
|
||
--- | ||
|
||
Code | ||
assert_named_list(list("a", "b")) | ||
Condition | ||
Error in `assert_named_list()`: | ||
! `value` must be a named list with unique names | ||
|
Oops, something went wrong.