Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
11a3bade
Commit
11a3bade
authored
Dec 16, 2017
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unit test for PluginOptions
parent
11dd7112
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
34 deletions
+38
-34
core/src/test/java/com/github/shadowsocks/ExampleUnitTest.java
...src/test/java/com/github/shadowsocks/ExampleUnitTest.java
+0
-17
plugin/src/test/java/com/github/shadowsocks/plugin/ExampleUnitTest.java
...t/java/com/github/shadowsocks/plugin/ExampleUnitTest.java
+0
-17
plugin/src/test/java/com/github/shadowsocks/plugin/PluginOptionsTest.kt
...t/java/com/github/shadowsocks/plugin/PluginOptionsTest.kt
+38
-0
No files found.
core/src/test/java/com/github/shadowsocks/ExampleUnitTest.java
deleted
100644 → 0
View file @
11dd7112
package
com.github.shadowsocks
;
import
org.junit.Test
;
import
static
org
.
junit
.
Assert
.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public
class
ExampleUnitTest
{
@Test
public
void
addition_isCorrect
()
throws
Exception
{
assertEquals
(
4
,
2
+
2
);
}
}
\ No newline at end of file
plugin/src/test/java/com/github/shadowsocks/plugin/ExampleUnitTest.java
deleted
100644 → 0
View file @
11dd7112
package
com.github.shadowsocks.plugin
;
import
org.junit.Test
;
import
static
org
.
junit
.
Assert
.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public
class
ExampleUnitTest
{
@Test
public
void
addition_isCorrect
()
throws
Exception
{
assertEquals
(
4
,
2
+
2
);
}
}
\ No newline at end of file
plugin/src/test/java/com/github/shadowsocks/plugin/PluginOptionsTest.kt
0 → 100644
View file @
11a3bade
/*******************************************************************************
* *
* Copyright (C) 2017 by Max Lv <max.c.lv@gmail.com> *
* Copyright (C) 2017 by Mygod Studio <contact-shadowsocks-android@mygod.be> *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
package
com.github.shadowsocks.plugin
import
org.junit.Assert
import
org.junit.Test
class
PluginOptionsTest
{
@Test
fun
equal
()
{
val
o1
=
PluginOptions
(
"obfs-local;obfs=http;obfs-host=localhost"
)
val
o2
=
PluginOptions
(
"obfs-local"
,
"obfs-host=localhost;obfs=http"
)
Assert
.
assertEquals
(
o1
.
hashCode
(),
o2
.
hashCode
())
Assert
.
assertEquals
(
true
,
o1
==
o2
)
val
o3
=
PluginOptions
(
o1
.
toString
(
false
))
Assert
.
assertEquals
(
true
,
o2
==
o3
)
val
o4
=
PluginOptions
(
o2
.
id
,
o2
.
toString
())
Assert
.
assertEquals
(
true
,
o3
==
o4
)
}
}
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