diff --git a/test/vector/constructors/from_list_constructor/vector_from_list_constructor_test_group_factory.dart b/test/vector/constructors/from_list_constructor/vector_from_list_constructor_test_group_factory.dart index f42df26b..ad259200 100644 --- a/test/vector/constructors/from_list_constructor/vector_from_list_constructor_test_group_factory.dart +++ b/test/vector/constructors/from_list_constructor/vector_from_list_constructor_test_group_factory.dart @@ -56,5 +56,25 @@ void vectorFromListConstructorTestGroupFactory(DType dtype) => expect(vector.length, 0); expect(vector.dtype, dtype); }); + + test('should provide correct size of vectors when summing up, length is 3', () { + final vector1 = Vector.fromList([1, 2, 3], dtype: dtype); + final vector2 = Vector.fromList([3, 4, 5], dtype: dtype); + final vector = vector1 + vector2; + + expect(vector, equals([4, 6, 8])); + expect(vector.length, 3); + expect(vector.dtype, dtype); + }); + + test('should provide correct size of vectors when summing up, length is 5', () { + final vector1 = Vector.fromList([1, 2, 3, 4, 5], dtype: dtype); + final vector2 = Vector.fromList([3, 4, 5, 6, 7], dtype: dtype); + final vector = vector1 + vector2; + + expect(vector, equals([4, 6, 8, 10, 12])); + expect(vector.length, 5); + expect(vector.dtype, dtype); + }); }); });