tests/testthat/test_06_majoritySingleVetoGame.R

boolSkip=F

test_that("Check 06.1 - function based on the 'Majority Game with One Veto Player' ",{
  if(boolSkip){
    skip("Test was skipped")
  }
  S=c(1, 2, 3)
  result=majoritySingleVetoGameValue(S = S, vetoPlayer = 1)
  expect_equal(result, 1)
})

test_that("Check 06.2 - function based on the 'Majority Game with One Veto Player' ",{
  if(boolSkip){
    skip("Test was skipped")
  }
  S=c(1)
  result=majoritySingleVetoGameValue(S = S, vetoPlayer = 1)
  expect_equal(result, 0)
})

test_that("Check 06.3 - function based on the 'Majority Game with One Veto Player' ",{
  if(boolSkip){
    skip("Test was skipped")
  }
  S=c(2)
  result=majoritySingleVetoGameValue(S = S, vetoPlayer = 1)
  expect_equal(result, 0)
})

test_that("Check 06.3 - function based on the 'Majority Game with One Veto Player' ",{
  if(boolSkip){
    skip("Test was skipped")
  }
  S=c(2, 3)
  result=majoritySingleVetoGameValue(S = S, vetoPlayer = 1)
  expect_equal(result, 0)
})

test_that("Check 06.4 - function based on the 'Majority Game with One Veto Player' ",{
  if(boolSkip){
    skip("Test was skipped")
  }
  S=c(1, 2)
  result=majoritySingleVetoGameValue(S = S, vetoPlayer = 1)
  expect_equal(result, 1)
})

test_that("Check 06.4 - function based on the 'Majority Game with One Veto Player' ",{
  if(boolSkip){
    skip("Test was skipped")
  }
  S=c(1, 2, 4)
  result=majoritySingleVetoGameValue(S = S, vetoPlayer = 4)
  expect_equal(result, 1)
})

Try the CoopGame package in your browser

Any scripts or data that you put into this service are public.

CoopGame documentation built on Aug. 24, 2021, 1:07 a.m.