#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
int t, n;
ll a, b;
string road;
int main() {
  cin >> t;
  while (t--) {
    cin >> n >> a >> b;
    cin >> road;
    ll res = b;
    int last = -1;
    for (int i = 0; i < n; ++i) {
      if (road[i] == '0') {
        if (last != -1 && i + 1 < n && road[i + 1] == '1') {
          ll quantity = i - last;
          ll value1 = quantity * (a + 2 * b);
          ll value2 = 4 * a + 3 * b + (quantity - 2) * (a + b);
          if (value2 < 0) {
            value2 = 1e18;
          }
          res += min(value1, value2);
        }
      } else {
        if (last == -1) {
          res += (i + 1) * (a + b);
        }
        last = i;
        res += a + 2 * b;
      }
    }
    if (last == -1) {
      res += n * (a + b);
    } else {
      res += 2 * a + (n - last - 2) * (a + b) + b;
    }
    cout << res << endl;
  }
  return 0;
}
