-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unified test launch for both meson and cmake: make/ninja test. Support tests for cmake through ctest. Enable jid test in libdino. Enable tests for win64 CI/CD.
- Loading branch information
Showing
12 changed files
with
91 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
using Dino.Entities; | ||
using Xmpp; | ||
|
||
namespace Dino.Test { | ||
|
||
|
@@ -12,27 +13,39 @@ class JidTest : Gee.TestCase { | |
} | ||
|
||
private void test_parse() { | ||
Jid jid = new Jid("[email protected]/res"); | ||
fail_if(jid.localpart != "user"); | ||
fail_if(jid.domainpart != "example.com"); | ||
fail_if(jid.resourcepart != "res"); | ||
fail_if(jid.to_string() != "[email protected]/res"); | ||
try { | ||
Jid jid = new Jid("[email protected]/res"); | ||
fail_if(jid.localpart != "user"); | ||
fail_if(jid.domainpart != "example.com"); | ||
fail_if(jid.resourcepart != "res"); | ||
fail_if(jid.to_string() != "[email protected]/res"); | ||
} catch (Error e) { | ||
fail_if_reached(@"Throws $(e.message)"); | ||
} | ||
} | ||
|
||
private void test_components() { | ||
Jid jid = new Jid.components("user", "example.com", "res"); | ||
fail_if(jid.localpart != "user"); | ||
fail_if(jid.domainpart != "example.com"); | ||
fail_if(jid.resourcepart != "res"); | ||
fail_if(jid.to_string() != "[email protected]/res"); | ||
try { | ||
Jid jid = new Jid.components("user", "example.com", "res"); | ||
fail_if(jid.localpart != "user"); | ||
fail_if(jid.domainpart != "example.com"); | ||
fail_if(jid.resourcepart != "res"); | ||
fail_if(jid.to_string() != "[email protected]/res"); | ||
} catch (Error e) { | ||
fail_if_reached(@"Throws $(e.message)"); | ||
} | ||
} | ||
|
||
private void test_with_res() { | ||
Jid jid = new Jid.with_resource("[email protected]", "res"); | ||
fail_if(jid.localpart != "user"); | ||
fail_if(jid.domainpart != "example.com"); | ||
fail_if(jid.resourcepart != "res"); | ||
fail_if(jid.to_string() != "[email protected]/res"); | ||
try { | ||
Jid jid = new Jid("[email protected]").with_resource("res"); | ||
fail_if(jid.localpart != "user"); | ||
fail_if(jid.domainpart != "example.com"); | ||
fail_if(jid.resourcepart != "res"); | ||
fail_if(jid.to_string() != "[email protected]/res"); | ||
} catch (Error e) { | ||
fail_if_reached(@"Throws $(e.message)"); | ||
} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters