Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Prog2
/
szorgalmi_feladatok
/
cipher
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
1abaf880
authored
Apr 01, 2022
by
karsazoltan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix CipherQueue test
parent
3cd7e706
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
test.cpp
+17
-2
No files found.
test.cpp
View file @
1abaf880
...
...
@@ -110,9 +110,9 @@ int main() {
}
END
#endif
//CipherQueue tesztek
CipherQueue
queue
;
//kell majd a következőhöz is
#if ELKESZULT > 8
TEST
(
Cipher_Queue
:
caesar
+
mycipher
,
_meg
tobb
szorgalmit
prog2bol
)
{
CipherQueue
queue
;
const
CaesarCipher
caesar
(
6
);
const
MyCipher
myCipher
(
"abc"
,
-
2
);
queue
.
add
(
caesar
.
clone
());
...
...
@@ -123,8 +123,22 @@ int main() {
EXPECT_STREQ
(
"meg tobb szorgalmit progkettobol"
,
str2
.
c_str
());
}
END
#endif
CipherQueue
queue
;
//kell majd a következőkhöz is
#if ELKESZULT > 9
TEST
(
Cipher_Queue
:
inner
queue
,
_pointert
mindenhova
)
{
TEST
(
Cipher_Queue
:
inner
queue
,
_pointert
mindenhova_alfa
)
{
CipherQueue
inner
;
inner
.
add
(
new
MyCipher
(
"queue"
));
inner
.
add
(
new
CaesarCipher
(
10
));
queue
.
add
(
inner
.
clone
());
queue
.
add
(
queue
.
clone
());
//ennek sem kellene gondot okoznia
std
::
string
str1
=
queue
.
encode
(
"pointert mindenhova"
);
EXPECT_STREQ
(
"pyobdolj gcrdmrlcfs"
,
str1
.
c_str
());
std
::
string
str2
=
queue
.
decode
(
str1
);
EXPECT_STREQ
(
"pointert mindenhova"
,
str2
.
c_str
());
}
END
#endif
#if ELKESZULT > 9
TEST
(
Cipher_Queue
:
inner
queue
,
_pointert
mindenhova_beta
)
{
std
::
srand
(
std
::
time
(
nullptr
));
CipherQueue
inner
;
inner
.
add
(
new
MyCipher
(
"queue"
));
...
...
@@ -164,3 +178,4 @@ int main() {
GTEND
(
std
::
cerr
);
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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