Are you looking for something like this ?
a <- matrix(rep(0,4), nrow = 2)
a
#> [,1] [,2]
#> [1,] 0 0
#> [2,] 0 0
b <- a
b[1, 1] <- 1
b
#> [,1] [,2]
#> [1,] 1 0
#> [2,] 0 0
all(a == 0)
#> [1] TRUE
all(b == 0)
#> [1] FALSE
Created on 2018-09-11 by the reprex package (v0.2.0).
It is just testing assertions then test if all TRUE or not.