{"action":"created","issue":{"url":"https://api.github.com/repos/MihaChug/OOP/issues/2","repository_url":"https://api.github.com/repos/MihaChug/OOP","labels_url":"https://api.github.com/repos/MihaChug/OOP/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/MihaChug/OOP/issues/2/comments","events_url":"https://api.github.com/repos/MihaChug/OOP/issues/2/events","html_url":"https://github.com/MihaChug/OOP/issues/2","id":157827064,"number":2,"title":"Замечания по программе Car","user":{"login":"alexey-malov","id":6040682,"avatar_url":"https://avatars.githubusercontent.com/u/6040682?v=3","gravatar_id":"","url":"https://api.github.com/users/alexey-malov","html_url":"https://github.com/alexey-malov","followers_url":"https://api.github.com/users/alexey-malov/followers","following_url":"https://api.github.com/users/alexey-malov/following{/other_user}","gists_url":"https://api.github.com/users/alexey-malov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey-malov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey-malov/subscriptions","organizations_url":"https://api.github.com/users/alexey-malov/orgs","repos_url":"https://api.github.com/users/alexey-malov/repos","events_url":"https://api.github.com/users/alexey-malov/events{/privacy}","received_events_url":"https://api.github.com/users/alexey-malov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-06-01T05:36:10Z","updated_at":"2016-06-01T05:47:51Z","closed_at":null,"body":"С какой целью используется ключевое слово static (в заголовочном файле ClassCar.h) ?\r\n\r\nС какой целью используется ключевое слово static перед типами. Для чего const?\r\n\r\nС 4 уровнем предупреждений компилятор выдает:\r\n```\r\n1>  ClassCar.cpp\r\n1>c:\\teaching\\2016\\chugunov\\oop\\lab3\\ccar\\ccar\\classcar.h(3): warning C4091: 'static ': ignored on left of 'const GEARBOX_STATE' when no variable is declared\r\n1>c:\\teaching\\2016\\chugunov\\oop\\lab3\\ccar\\ccar\\classcar.h(5): warning C4091: 'static ': ignored on left of 'const MOVEMENT_DRIECTION' when no variable is declared\r\n1>  Car.cpp\r\n1>c:\\teaching\\2016\\chugunov\\oop\\lab3\\ccar\\ccar\\classcar.h(3): warning C4091: 'static ': ignored on left of 'const GEARBOX_STATE' when no variable is declared\r\n1>c:\\teaching\\2016\\chugunov\\oop\\lab3\\ccar\\ccar\\classcar.h(5): warning C4091: 'static ': ignored on left of 'const MOVEMENT_DRIECTION' when no variable is declared\r\n```"},"comment":{"url":"https://api.github.com/repos/MihaChug/OOP/issues/comments/222898827","html_url":"https://github.com/MihaChug/OOP/issues/2#issuecomment-222898827","issue_url":"https://api.github.com/repos/MihaChug/OOP/issues/2","id":222898827,"user":{"login":"alexey-malov","id":6040682,"avatar_url":"https://avatars.githubusercontent.com/u/6040682?v=3","gravatar_id":"","url":"https://api.github.com/users/alexey-malov","html_url":"https://github.com/alexey-malov","followers_url":"https://api.github.com/users/alexey-malov/followers","following_url":"https://api.github.com/users/alexey-malov/following{/other_user}","gists_url":"https://api.github.com/users/alexey-malov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey-malov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey-malov/subscriptions","organizations_url":"https://api.github.com/users/alexey-malov/orgs","repos_url":"https://api.github.com/users/alexey-malov/repos","events_url":"https://api.github.com/users/alexey-malov/events{/privacy}","received_events_url":"https://api.github.com/users/alexey-malov/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T05:47:51Z","updated_at":"2016-06-01T05:47:51Z","body":"В тестах недостаточно проверять, что тот или иной метод, выполняющий модификацию состояния автомобиля, вернул true/false. Надо еще проверять состояние автомобиля, что оно перешло в ожидаемое (если ожидается успех), либо осталось прежним (если ожидается неудача).\r\n\r\nДля упрощения проверок сделайте вспомогательные методы в фикстурах или функции, чтобы можно было вызывать как-то так:\r\n```c++\r\n// Проверяет, что выполнение операции вернет true и автомобиль будет иметь указанное состояние\r\nExpectSuccess([this]{ return car.SetSpeed(42); }, true, GEARBOX_STATE::second, 42);\r\n\r\n// Проверяет, что после выполнение переданной операции вернет false и автомобиль останется в прежнем состоянии\r\nExpectFailure([this]{ return car.SetGear(GEARBOX_STATE::back);});\r\n```"}}
{"actor":{"display_login":"alexey-malov"}}