Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Keisuke ANDO
socceR
Commits
ee5cf161
Commit
ee5cf161
authored
Dec 08, 2022
by
Keisuke ANDO
😌
Browse files
[update] close
#4
, close
#3
, close
#2
; RPackage化
parent
b28e230f
Changes
30
Show whitespace changes
Inline
Side-by-side
R
/read_rcl.R
→
temp
/read_rcl.R
View file @
ee5cf161
File moved
data
/spadl.csv
→
temp
/spadl.csv
View file @
ee5cf161
File moved
R
/test.R
→
temp
/test.R
View file @
ee5cf161
File moved
R
/test.rcg
→
temp
/test.rcg
View file @
ee5cf161
File moved
data
/test.rcl
→
temp
/test.rcl
View file @
ee5cf161
File moved
tests/testthat.R
0 → 100644
View file @
ee5cf161
# This file is part of the standard setup for testthat.
# It is recommended that you do not modify it.
#
# Where should you do additional test configuration?
# Learn more about the roles of various files in:
# * https://r-pkgs.org/tests.html
# * https://testthat.r-lib.org/reference/test_package.html#special-files
library
(
testthat
)
library
(
socceR
)
test_check
(
"socceR"
)
data
/20220405162804-HELIOS_base_3-vs-enemy_2.rcg
→
tests/testthat
/20220405162804-HELIOS_base_3-vs-enemy_2.rcg
View file @
ee5cf161
File moved
data
/20220405162804-HELIOS_base_3-vs-enemy_2.rcl
→
tests/testthat
/20220405162804-HELIOS_base_3-vs-enemy_2.rcl
View file @
ee5cf161
File moved
tests/testthat/not_log_file.txt
0 → 100644
View file @
ee5cf161
tests/testthat/test-read-log.R
0 → 100644
View file @
ee5cf161
test_that
(
"Read rcl file without error"
,
{
expect_no_error
(
read_log
(
test_path
(
"20220405162804-HELIOS_base_3-vs-enemy_2.rcl"
)))
})
test_that
(
"Read rcg file without error"
,
{
expect_no_error
(
read_log
(
test_path
(
"20220405162804-HELIOS_base_3-vs-enemy_2.rcg"
)))
})
test_that
(
"All items in rcg file must be retained"
,
{
rcg
<-
read_log
(
test_path
(
"20220405162804-HELIOS_base_3-vs-enemy_2.rcg"
))
expect_true
(
"header"
%in%
names
(
rcg
))
expect_true
(
"server_param"
%in%
names
(
rcg
))
expect_true
(
"player_param"
%in%
names
(
rcg
))
expect_true
(
"player_type"
%in%
names
(
rcg
))
expect_true
(
"team"
%in%
names
(
rcg
))
expect_true
(
"show"
%in%
names
(
rcg
))
expect_true
(
"msg"
%in%
names
(
rcg
))
})
test_that
(
"Do not read file that is not log file"
,
{
expect_error
(
read_log
(
test_path
(
"not_log_file.txt"
)))
})
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment