{"action":"created","issue":{"url":"https://api.github.com/repos/EvoSuite/evosuite/issues/91","repository_url":"https://api.github.com/repos/EvoSuite/evosuite","labels_url":"https://api.github.com/repos/EvoSuite/evosuite/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/EvoSuite/evosuite/issues/91/comments","events_url":"https://api.github.com/repos/EvoSuite/evosuite/issues/91/events","html_url":"https://github.com/EvoSuite/evosuite/issues/91","id":215318115,"number":91,"title":"I have a question about unit test.","user":{"login":"LDily","id":26396044,"avatar_url":"https://avatars2.githubusercontent.com/u/26396044?v=3","gravatar_id":"","url":"https://api.github.com/users/LDily","html_url":"https://github.com/LDily","followers_url":"https://api.github.com/users/LDily/followers","following_url":"https://api.github.com/users/LDily/following{/other_user}","gists_url":"https://api.github.com/users/LDily/gists{/gist_id}","starred_url":"https://api.github.com/users/LDily/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LDily/subscriptions","organizations_url":"https://api.github.com/users/LDily/orgs","repos_url":"https://api.github.com/users/LDily/repos","events_url":"https://api.github.com/users/LDily/events{/privacy}","received_events_url":"https://api.github.com/users/LDily/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-20T02:31:09Z","updated_at":"2017-03-21T06:46:13Z","closed_at":"2017-03-20T07:15:14Z","body":"such as an example of Triangle.\r\npublic int type(double a,double b,double c){  \r\n\t\tint result = 0;    \r\n\t\tboolean b11 = a + b > c;   \r\n\t\tboolean b12 = a + c > b;   \r\n\t\tboolean b13 = b + c > a;   \r\n\t\tif(b11 && b12 && b13){    \r\n\t\t\tif(a == b && b == c){     \r\n\t\t\t\tresult = 1;     \r\n\t\t\t\t}else if(a == b || b == c || a == c){       \r\n\t\t\t\t\tresult = 2;    \r\n\t\t\t\t\t}else{      \r\n\t\t\t\t\t\tresult = 3;    \r\n\t\t\t\t\t\t}   }else{    \r\n\t\t\t\t\t\t\tresult = -1;\r\n\t\t\t\t\t\t\t}\r\n\t\treturn result; \r\n}\r\nif it is a equilateral triangle ,I want to return 1. But if I write 2 wrongly, and the test case generated by evosuite is \"assertEquals(2,(4.4.4));\" and passed. So it can't find the problem of the code. How can evosuite find this kind of error of the code? \r\nThank you. "},"comment":{"url":"https://api.github.com/repos/EvoSuite/evosuite/issues/comments/287990974","html_url":"https://github.com/EvoSuite/evosuite/issues/91#issuecomment-287990974","issue_url":"https://api.github.com/repos/EvoSuite/evosuite/issues/91","id":287990974,"user":{"login":"LDily","id":26396044,"avatar_url":"https://avatars2.githubusercontent.com/u/26396044?v=3","gravatar_id":"","url":"https://api.github.com/users/LDily","html_url":"https://github.com/LDily","followers_url":"https://api.github.com/users/LDily/followers","following_url":"https://api.github.com/users/LDily/following{/other_user}","gists_url":"https://api.github.com/users/LDily/gists{/gist_id}","starred_url":"https://api.github.com/users/LDily/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LDily/subscriptions","organizations_url":"https://api.github.com/users/LDily/orgs","repos_url":"https://api.github.com/users/LDily/repos","events_url":"https://api.github.com/users/LDily/events{/privacy}","received_events_url":"https://api.github.com/users/LDily/received_events","type":"User","site_admin":false},"created_at":"2017-03-21T06:46:13Z","updated_at":"2017-03-21T06:46:13Z","body":"I don't know if I understand right. \r\nas you say, evosuite generates tests based on the current behaviour of the program,so all the test cases generated by evosuite will be passed ? It can't find the bug of the current source code?\r\nI re-run the test cases when the source code changed ,then it will find the bug of the source code?\r\nThanks."}}
{"actor":{"display_login":"LDily"}}