Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ext/attribute_dictionary.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,6 @@ VALUE AttributeDictionary_Init(VALUE Sketchup, VALUE Sketchup_Entity)
rb_define_method(Sketchup_AttributeDictionary, "keys", Sketchup_AttributeDictionary_keys, 0);
rb_define_method(Sketchup_AttributeDictionary, "values", Sketchup_AttributeDictionary_values, 0);
rb_define_method(Sketchup_AttributeDictionary, "delete_key", Sketchup_AttributeDictionary_delete_key, 1);
rb_define_alias(Sketchup_AttributeDictionary, "count", "size");
return Sketchup_AttributeDictionary;
}
4 changes: 4 additions & 0 deletions test/test_attribute_dictionary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ def test_size
assert_equal(7, @attribute_dictionary.size)
end

def test_count_is_alias_of_size
assert_equal(@attribute_dictionary.size, @attribute_dictionary.count)
end

def test_values
assert_equal(
[0.1557307335588798, 40.018309, 'Manual', -105.242139, -18_871_519.616960514, -174_402_260.58333763, false],
Expand Down
Loading