我想测试在公共函数中调用的私有函数,如何访问私有函数内的代码。
{
"engineering": [
{
"schools": [
{
"id": 1,
"name": "Amrita School of Engineering"
},
],
"location": "Kollam"
},
{
"schools": [
{
"id": 3,
"name": "Amrita School of Medicine"
},
{
"id": 4,
"name": "Amrita School of Engineering"
}
],
"location": "Kozhikode"
}
],
"medicine": [{
"schools": [
{
"id": 2,
"name": "Amrita School of Medicine"
},
],
"location": "Kollam"
},
]
如何在调用私有函数后测试“flag”的值是否已更改?我试图窥探privateFunction,但它给我的方法不存在错误。