{"action":"created","issue":{"url":"https://api.github.com/repos/bxparks/AUnit/issues/37","repository_url":"https://api.github.com/repos/bxparks/AUnit","labels_url":"https://api.github.com/repos/bxparks/AUnit/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/bxparks/AUnit/issues/37/comments","events_url":"https://api.github.com/repos/bxparks/AUnit/issues/37/events","html_url":"https://github.com/bxparks/AUnit/issues/37","id":352913674,"node_id":"MDU6SXNzdWUzNTI5MTM2NzQ=","number":37,"title":"Support assert* in (anonymous) callbacks","user":{"login":"squix78","id":716822,"node_id":"MDQ6VXNlcjcxNjgyMg==","avatar_url":"https://avatars2.githubusercontent.com/u/716822?v=4","gravatar_id":"","url":"https://api.github.com/users/squix78","html_url":"https://github.com/squix78","followers_url":"https://api.github.com/users/squix78/followers","following_url":"https://api.github.com/users/squix78/following{/other_user}","gists_url":"https://api.github.com/users/squix78/gists{/gist_id}","starred_url":"https://api.github.com/users/squix78/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squix78/subscriptions","organizations_url":"https://api.github.com/users/squix78/orgs","repos_url":"https://api.github.com/users/squix78/repos","events_url":"https://api.github.com/users/squix78/events{/privacy}","received_events_url":"https://api.github.com/users/squix78/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-22T11:34:17Z","updated_at":"2018-10-27T23:03:39Z","closed_at":null,"author_association":"NONE","body":"First of all, thank you so much for this great library!!!\r\n\r\nI have the following test code:\r\n```\r\ntest(parseEvent) {\r\n  String eventText = String(\"BEGIN:VEVENT\\nEND:VEVENT\");\r\n  parser.parseEvent(eventText, [](ICalParser::Event event) {\r\n    assertEqual(123, event.startDate);\r\n  });\r\n}\r\n```\r\nSince the assertEqual is called within the callback function I'm getting the following compile error:\r\n```\r\nIn file included from .piolibdeps/AUnit_ID2778/src/AUnit.h:53:0,\r\nfrom src/main.cpp:2:\r\n\r\nsrc/main.cpp: In lambda function:\r\n.piolibdeps/AUnit_ID2778/src/aunit/AssertMacros.h:79:59: error: 'this' was not captured for this lambda function\r\nif (!assertion(__FILE__,__LINE__,(arg1),opName,op,(arg2)))\\\r\n^\r\n.piolibdeps/AUnit_ID2778/src/aunit/AssertMacros.h:41:5: note: in expansion of macro 'assertOpInternal'\r\nassertOpInternal(arg1,aunit::internal::compareEqual,\"==\",arg2)\r\n^\r\nsrc/main.cpp:56:5: note: in expansion of macro 'assertEqual'\r\nassertEqual(123, 123);\r\n^\r\n*** [.pioenvs/nodemcuv2/src/main.cpp.o] Error 1\r\n```\r\nIs it possible that I can do an assertion in a callback? \r\nPlatform: Espressif/ ESP8266, Platformio\r\n\r\nThank you so much!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bxparks/AUnit/issues/comments/433662431","html_url":"https://github.com/bxparks/AUnit/issues/37#issuecomment-433662431","issue_url":"https://api.github.com/repos/bxparks/AUnit/issues/37","id":433662431,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzY2MjQzMQ==","user":{"login":"bxparks","id":26933282,"node_id":"MDQ6VXNlcjI2OTMzMjgy","avatar_url":"https://avatars0.githubusercontent.com/u/26933282?v=4","gravatar_id":"","url":"https://api.github.com/users/bxparks","html_url":"https://github.com/bxparks","followers_url":"https://api.github.com/users/bxparks/followers","following_url":"https://api.github.com/users/bxparks/following{/other_user}","gists_url":"https://api.github.com/users/bxparks/gists{/gist_id}","starred_url":"https://api.github.com/users/bxparks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bxparks/subscriptions","organizations_url":"https://api.github.com/users/bxparks/orgs","repos_url":"https://api.github.com/users/bxparks/repos","events_url":"https://api.github.com/users/bxparks/events{/privacy}","received_events_url":"https://api.github.com/users/bxparks/received_events","type":"User","site_admin":false},"created_at":"2018-10-27T23:03:39Z","updated_at":"2018-10-27T23:03:39Z","author_association":"OWNER","body":"Hi, Wondering if you had any additional questions. Otherwise, I want to close this for housecleaning."}}
{"actor":{"display_login":"bxparks"}}