search for: expect_that

Displaying 9 results from an estimated 9 matches for "expect_that".

2017 Jan 04
4
RFC: Reconsidering adding gmock to LLVM's unittest utilities
...there are two components to what gmock offers. The first has very little to do with "mocks". It is actually a matcher language and system for writing test predicates: > > EXPECT_EQ(expected, actual); > EXPECT_NE(something, something); > > Become instead: > > EXPECT_THAT(actual, Eq(expected)); > EXPECT_THAT(actual, Ne(not-expected)); For the cases where you have containers and other non-trivial objects, I completely agree that this is compelling. However, for simple cases like string equality I don't like the change from EXPECT_EQ(a, b) to EXPECT_THAT(a,...
2017 Jan 04
5
RFC: Reconsidering adding gmock to LLVM's unittest utilities
...it is important to understand that there are two components to what gmock offers. The first has very little to do with "mocks". It is actually a matcher language and system for writing test predicates: EXPECT_EQ(expected, actual); EXPECT_NE(something, something); Become instead: EXPECT_THAT(actual, Eq(expected)); EXPECT_THAT(actual, Ne(not-expected)); This pattern moves the *matcher* out of the *macro*, giving it a proper C++ API. With that, we get two huge benefits: extensibility and composability. You can easily write a matcher that summarizes concisely the expectation for custom...
2010 Sep 01
0
testthat: version 0.3
...er/). I have used what I think works for R, and abandoned what doesn't, creating a testing environment that is philosophically centred in R. Changes in version 0.3 ----------------------------------------------------------------- * all expectations now have a shortcut form, so instead of expect_that(a, is_identical_to(b)) you can do expect_identical(a, b) * new shows_message and gives_warning expectations to test warnings and messages * expect_that, equals, is_identical_to and is_equivalent to now have additional label argument which allows you to control the appearance of the t...
2010 Sep 01
0
testthat: version 0.3
...er/). I have used what I think works for R, and abandoned what doesn't, creating a testing environment that is philosophically centred in R. Changes in version 0.3 ----------------------------------------------------------------- * all expectations now have a shortcut form, so instead of expect_that(a, is_identical_to(b)) you can do expect_identical(a, b) * new shows_message and gives_warning expectations to test warnings and messages * expect_that, equals, is_identical_to and is_equivalent to now have additional label argument which allows you to control the appearance of the t...
2009 Apr 16
6
Cucumber - step negating another expecting step
On 16 Apr 2009, at 11:22, Joaquin Rivera Padron wrote: > at the moment I do it this way, hiding the complexity out of the > steps: > > Then /^I should see the people search form$/ do > people_search_form_exists > end > > Then /^I should not see the people search form$/ do > people_search_form_exists "not" > end > > and then the method: > >
2015 Apr 19
4
running unit tests on the stringr package
...ttern"\n" 3. Error: error when string and pattern lengths incompatible ------------------- could not find function "check_pattern" 1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls) 2: eval(code, new_test_environment) 3: eval(expr, envir, enclos) 4: expect_that(check_pattern(letters, "a"), equals(letters)) at test-check.r:14 5: condition(object) 6: compare(expected, actual, ...) 7: compare.character(expected, actual, ...) 8: identical(x, y) What am I doing wrong? I am using a Debian box with a combo of Wheezy + Jessie % dpkg -l r-cran-testtha...
2015 Apr 20
0
running unit tests on the stringr package
...rror: error when string and pattern lengths incompatible > ------------------- could not find function "check_pattern" > 1: withCallingHandlers(eval(code, new_test_environment), error = > capture_calls) 2: eval(code, new_test_environment) > 3: eval(expr, envir, enclos) > 4: expect_that(check_pattern(letters, "a"), equals(letters)) at > test-check.r:14 5: condition(object) > 6: compare(expected, actual, ...) > 7: compare.character(expected, actual, ...) > 8: identical(x, y) > > What am I doing wrong? > > I am using a Debian box with a combo of W...
2016 Apr 19
3
installation of dplyr
..._cpp_tests_pass html expect_equal_to_reference html expect_length html expect_match html expect_named html expect_success html expect_that html expectation html fail html find_reporter html find_test_scripts html inheritance-expectations html logic...
2016 Apr 19
0
installation of dplyr
...html > expect_equal_to_reference html > expect_length html > expect_match html > expect_named html > expect_success html > expect_that html > expectation html > fail html > find_reporter html > find_test_scripts html > inheritance-expectations h...