Advertisement
Guest User

bayes-glib vala example

a guest
Feb 19th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.33 KB | None | 0 0
  1. // valac test-bayes.vala --pkg Bayes-1.0
  2. static void main(string[] args) {
  3.     Test.init (ref args);
  4.  
  5.     Test.add_func ("/Guess/basic", () => {
  6.         Bayes.Guess guess = new Bayes.Guess ("english", 0.4567);
  7.         assert (guess.get_name () == "english");
  8.         assert (guess.get_probability () == 0.4567);
  9.         guess.unref ();
  10.     });
  11.  
  12.     Test.run ();
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement