#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int T;
  cin >> T;
  for (int t = 0; t < T; ++t) {
    long long int n;
    long long int a, b;
    cin >> n >> a >> b;
    string s;
    cin >> s;
    long long int bc = n * (a + b) + b;
    bool ftram = true;
    bool ztram = true;
    long long int fzero = -1;
    long long int nc = 0;
    for (int i = 0; i < n; ++i) {
      if (s[i] == '0') {
        if (!ztram) {
          fzero = i;
          ztram = true;
        }
      } else {
        if (ztram) {
          if (ftram) {
            nc += a;
            ftram = false;
          } else {
            nc += min(2 * a, (i - fzero - 1) * b);
          }
          ztram = false;
          nc += b;
        }
        nc += b;
      }
    }
    if (!ftram) nc += a;
    cout << bc + nc << endl;
  }
}
