#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
using pii = pair<int, int>;
void solve() {
  long long n, a, b;
  string str;
  vector<pii> v;
  vector<long long> gap;
  cin >> n >> a >> b;
  cin >> str;
  long long cost = a * n + b * n + b;
  long long l = 0, r = 0;
  for (long long i = 0; i < n; i++) {
    if (str[i] == '0') {
      if (l != r) v.push_back({l, r - 1});
      l = i + 1, r = i + 1;
    } else
      r++;
  }
  long long vs = v.size();
  long long bp = vs;
  for (long long i = 1; i < vs; i++) {
    if (v[i].first - v[i - 1].second > 2)
      gap.push_back(v[i].first - v[i - 1].second - 2);
    else
      bp--;
  }
  for (auto it : gap) {
    if (it * b <= 2 * a) {
      cost += (it * b);
      bp--;
    }
  }
  for (auto it : v) cost += ((b) * (it.second - it.first + 2));
  cost += (a * 2 * (bp));
  cout << cost << '\n';
}
int32_t main() {
  long long t;
  cin >> t;
  while (t--) {
    solve();
  }
}
