# GdUnitVector2Assert - MikeSchulze/gdUnit3 Wiki

🚨 github-wiki-see.page does not render Org-Mode. Source for crawling below. Please visit the Original URL! 🚨

``````
*** is_equal
Verifies that the current value is equal to the given one.
#+BEGIN_QUOTE
``` python
func assert_vector2(<current>).is_equal(<expected>) -> GdUnitVector2Assert
``````
``````	# this assertion succeeds
assert_vector2(Vector2(1.1, 1.2)).is_equal(Vector2(1.1, 1.2))

# this assertion fails because part y of the vector 1.2 are not equal to 1.3
assert_vector2(Vector2(1.1, 1.2)).is_equal(Vector2(1.1, 1.3))
``````

#+END_QUOTE

*** is_not_equal Verifies that the current value is not equal to the given one. #+BEGIN_QUOTE

``````func assert_vector2(<current>).is_not_equal(<expected>) -> GdUnitVector2Assert
``````
``````	# this assertion succeeds
assert_vector2(Vector2(1.1, 1.2)).is_not_equal(Vector2(1.1, 1.3))

# this assertion fails because both vectors are equal
assert_vector2(Vector2(1.1, 1.2)).is_not_equal(Vector2(1.1, 1.2))
``````

#+END_QUOTE

*** is_equal_approx Verifies that the current and expected value are approximately equal. #+BEGIN_QUOTE

``````func assert_vector2(<current>).is_equal_approx(expected, approx) -> GdUnitVector2Assert
``````
``````	# this assertion succeeds
assert_vector2(Vector2(0.996, 0.996)).is_equal_approx(Vector2.ONE, Vector2(0.004, 0.004))

# this will fail because the vector is out of approximated range
assert_vector2(Vector2(1.005, 1)).is_equal_approx(Vector2.ONE, Vector2(0.004, 0.004))
``````

#+END_QUOTE

*** is_less Verifies that the current value is less than the given one. #+BEGIN_QUOTE

``````func assert_vector2(<current>).is_less(<expected>) -> GdUnitVector2Assert
``````
``````	# this assertion succeeds
assert_vector2(Vector2.ZERO.is_less(Vector2.ONE)
assert_vector2(Vector2(1.1, 1.2)).is_less(Vector2(1.1, 1.3))

# this assertion fails because both vectors are equal
assert_vector2(Vector2(1.1, 1.2)).is_less(Vector2(1.1, 1.2))
``````

#+END_QUOTE

*** is_less_equal Verifies that the current value is less than or equal the given one. #+BEGIN_QUOTE

``````func assert_vector2(<current>).is_less_equal(<expected>) -> GdUnitVector2Assert
``````
``````	# this assertion succeeds
assert_vector2(Vector2(1.1, 1.2)).is_less_equal(Vector2(1.1, 1.3))
assert_vector2(Vector2(1.1, 1.2)).is_less_equal(Vector2(1.1, 1.2))

# this assertion fails because part y 1.3 is not less or equal to 1.2
assert_vector2(Vector2(1.1, 1.3)).is_less_equal(Vector2(1.1, 1.2))
``````

#+END_QUOTE

*** is_greater Verifies that the current value is greater than the given one. #+BEGIN_QUOTE

``````func assert_vector2(<current>).is_greater(<expected>) -> GdUnitVector2Assert
``````
``````	# this assertion succeeds
assert_vector2(Vector2(1.1, 1.3)).is_greater(Vector2(1.1, 1.2))

# this assertion fails because both vectors are equal
assert_vector2(Vector2(1.1, 1.2)).is_greater(Vector2(1.1, 1.2))
``````

#+END_QUOTE

*** is_greater_equal Verifies that the current value is greater than or equal the given one. #+BEGIN_QUOTE

``````func assert_vector2(<current>).is_greater_equal(<expected>) -> GdUnitVector2Assert
``````
``````  # this assertion succeeds
assert_vector2(Vector2(1.1, 1.3)).is_greater_equal(Vector2(1.1, 1.2))
assert_vector2(Vector2(1.1, 1.2)).is_greater_equal(Vector2(1.1, 1.2))

# this assertion fails because part y  1.2 is less than 1.3
assert_vector2(Vector2(1.1, 1.2)).is_greater_equal(Vector2(1.1, 1.3))
``````

#+END_QUOTE

*** is_between Verifies that the current value is between the given boundaries (inclusive). #+BEGIN_QUOTE

``````func assert_vector2(<current>).is_between (<from>, <to>) -> GdUnitVector2Assert
``````
``````	# this assertion succeeds
assert_vector2(Vector2(1.1, 1.2)).is_between(Vector2(1.1, 1.2), Vector2(1.1, 1.3))
assert_vector2(Vector2(1.1, 1.2)).is_between(Vector2(1.1, 1.1), Vector2(1.1, 1.3))

# this assertion fail because the part y 1.2 is not between 1.0 and 1.1
assert_vector2(Vector2(1.1, 1.2)).is_between (Vector2(1.1, 1.0), Vector2(1.1, 1.1))
``````

#+END_QUOTE

*** is_not_between Verifies that the current value is not between the given boundaries (inclusive). #+BEGIN_QUOTE

``````func assert_vector2(<current>).is_not_between(<from>, <to>) -> GdUnitVector2Assert
``````
``````	# this assertion succeeds
assert_vector2(Vector2(1.0, 1.0)).is_not_between(Vector2(1.1, 1.0), Vector2(2.0, 1.0))

# this assertion fail because the vector is between
assert_vector2(Vector2(1.0, 1.0)).is_not_between(Vector2(1.0, 1.0), Vector2(2.0, 1.0))
``````

#+END_QUOTE