Testing call command with different ways [0, c_nExecWayCount)
| 56 | // Testing call command with different ways [0, c_nExecWayCount) |
| 57 | // |
| 58 | Variant testCommandExecution(Variant vProcessor, Variant vCommand, Variant vParams, Size nWay) |
| 59 | { |
| 60 | switch (nWay) |
| 61 | { |
| 62 | case 0: |
| 63 | { |
| 64 | auto pCmd = queryInterface<ICommand>(createObject(CLSID_Command, Dictionary({ |
| 65 | {"processor", vProcessor}, |
| 66 | {"command", vCommand}, |
| 67 | {"params", vParams}, |
| 68 | }))); |
| 69 | return pCmd->execute(); |
| 70 | } |
| 71 | case 1: |
| 72 | { |
| 73 | auto pCmd = queryInterface<ICommand>(createObject(CLSID_Command, Dictionary({ |
| 74 | {"processor", vProcessor}, |
| 75 | {"command", vCommand}, |
| 76 | }))); |
| 77 | return pCmd->execute(vParams); |
| 78 | } |
| 79 | case 2: |
| 80 | { |
| 81 | auto pCmd = createCommand(Dictionary({ |
| 82 | {"processor", vProcessor}, |
| 83 | {"command", vCommand}, |
| 84 | {"params", vParams}, |
| 85 | })); |
| 86 | return pCmd->execute(); |
| 87 | } |
| 88 | case 3: |
| 89 | { |
| 90 | auto pCmd = createCommand(Dictionary({ |
| 91 | {"processor", vProcessor}, |
| 92 | {"command", vCommand}, |
| 93 | })); |
| 94 | return pCmd->execute(vParams); |
| 95 | } |
| 96 | case 4: |
| 97 | { |
| 98 | auto pCmd = createCommand(vProcessor, vCommand); |
| 99 | return pCmd->execute(vParams); |
| 100 | |
| 101 | } |
| 102 | case 5: |
| 103 | { |
| 104 | auto pCmd = createCommand(vProcessor, vCommand, vParams); |
| 105 | return pCmd->execute(); |
| 106 | } |
| 107 | case 6: |
| 108 | { |
| 109 | return execCommand(vProcessor, vCommand, vParams); |
| 110 | } |
| 111 | case 7: |
| 112 | { |
| 113 | return execCommand(Dictionary({ |
| 114 | {"processor", vProcessor}, |
| 115 | {"command", vCommand}, |
no test coverage detected