Skip to content

Commit

Permalink
Update test file to include filename annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
EssaAlshammri committed Apr 1, 2024
1 parent 5c43e7c commit 3a8e2a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/docs/go-fundamentals/arrays-and-slices.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ func SumAll(numbersToSum ...[]int) []int {
Go لا تسمح لك باستخدام عمليات المقارنة مع المصفوفات المرنة. يمكنك كتابة دالة للتكرار على كل `got` و `want` والتحقق من قيمهم ولكن للتسهيل، يمكننا استخدام [`reflect.DeepEqual`](https://golang.org/pkg/reflect/#DeepEqual) والتي تعتبر مفيدة لمعرفة ما إذا كان أي متغيرين متطابقين.


```go
```go {filename="sum_test.go"}
func TestSumAll(t *testing.T) {

got := SumAll([]int{1, 2}, []int{0, 9})
Expand Down

0 comments on commit 3a8e2a6

Please sign in to comment.