#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 100;
const long long INF = 1e18;
const long long inf = -1e18;
const long long MOD = 1e9 + 7;
const long long base = 1000 * 1000 * 1000;
long long binpow(int a, int n) {
  if (n == 0) return 1;
  if (n % 2 == 1)
    return binpow(a, n - 1) * a;
  else {
    long long b = binpow(a, n / 2);
    return b * b;
  }
}
long long n, a, b, q, t, k, ans, p, mx;
string s;
int main() {
  ios::sync_with_stdio(0);
  cin >> q;
  for (int i = 1; i <= q; i++) {
    cin >> n >> a >> b >> s;
    ans = 0;
    k = -1;
    for (int j = s.size() - 1; j >= 0; j--) {
      if (s[j] == '1') {
        k = j;
      }
    }
    t = 0;
    if (k != -1) {
      ans = k * b + (k - 1) * a + 2 * a;
      for (int j = k; j < s.size(); j++) {
        if (s[j] == '1') {
          if (t > 1) {
            ans += min(4 * a + (t - 2) * a + (t - 1) * b + 2 * b,
                       t * a + 2 * b * t);
          }
          if (t == 1) {
            ans += a + b * 2;
          }
          ans += a + 2 * b;
          t = 0;
          k = j;
        } else {
          t++;
        }
      }
      ans += t * b + 2 * b + 2 * a + (t - 1) * a;
      cout << ans << endl;
    } else {
      cout << (n + 1) * b + n * a << endl;
    }
  }
}
