我在使用Karma和Jasmine,在$scope上测试表达式没有任何问题,但是当尝试测试在Controller中使用“this”定义的表达式时,它返回为未定义的表达式。角表示在您的控制器中使用“此”是最好的实践,但我还没有找到测试的明确示例。user should equal to hello', function() { })
第一个测试通过,第二个测试
我收到以下错误test.cpp: In function ‘int test1(const int**, int)’: a=v[i];test.cpp: In function ‘int main()’:
test.cpp:31:20: error: invalid conversion from ‘int**’ to ‘const int**